set "SRC=%~dp0"
set "XAMPP_DIR=%SRC%\xampp"
set "XAMPP_INSTALLER=xampp-win32-7.3.1-0-VC15-installer.exe"
set "XAMPP_VERSION=c:\xampp\posapp_version.txt"
set "XAMPP_INSTALL=%XAMPP_DIR%\%XAMPP_INSTALLER%"

rem Run "xampp-win32-7.3.1-0-VC15-installer.exe --help" to list options
"%XAMPP_INSTALL%" --optionfile "%XAMPP_DIR%\install-xampp-options.txt"

copy "%XAMPP_DIR%\httpd.conf" c:\xampp\apache\conf\

rem c:\xampp\apache\apache_installservice.bat

rem c:\xampp\mysql\mysql_installservice.bat
echo Installing MySQL as an Service 
c:\xampp\mysql\bin\mysqld --install mysql --defaults-file="c:\xampp\mysql\bin\my.ini"
echo Try to start the MySQL deamon as service ... 
net start MySQL 

echo %XAMPP_INSTALLER% > "%XAMPP_VERSION%"

goto end

XAMPP 7.3.1-0
Usage:

 --help                                      Display the list of valid options

 --version                                   Display product information

 --unattendedmodeui <unattendedmodeui>       Unattended Mode UI
                                             Default: none
                                             Allowed: none minimal minimalWithDialogs

 --optionfile <optionfile>                   Installation option file
                                             Default: 

 --debuglevel <debuglevel>                   Debug information level of verbosity
                                             Default: 2
                                             Allowed: 0 1 2 3 4

 --mode <mode>                               Installation mode
                                             Default: qt
                                             Allowed: qt win32 unattended

 --debugtrace <debugtrace>                   Debug filename
                                             Default: 

 --enable-components <enable-components>     Comma-separated list of components
                                             Default: xampp_server,xampp_apache,xampp_mysql,xampp_filezilla,xampp_mercury,xampp_tomcat,xampp_program_languages,xampp_php,xampp_perl,xampp_tools,xampp_phpmyadmin,xampp_webalizer,xampp_sendmail
                                             Allowed: xampp_mysql xampp_filezilla xampp_mercury xampp_tomcat xampp_perl xampp_phpmyadmin xampp_webalizer xampp_sendmail

 --disable-components <disable-components>   Comma-separated list of components
                                             Default: 
                                             Allowed: xampp_mysql xampp_filezilla xampp_mercury xampp_tomcat xampp_perl xampp_phpmyadmin xampp_webalizer xampp_sendmail

 --installer-language <installer-language>   Language selection
                                             Default: en
                                             Allowed: sq ar es_AR az eu pt_BR bg ca hr cs da nl en et fi fr de el he hu id it ja kk ko lv lt no fa pl pt ro ru sr zh_CN sk sl es sv th zh_TW tr tk va vi cy

 --prefix <prefix>                           Select a folder
                                             Default: 

 --launchapps <launchapps>                   Learn more about Bitnami for XAMPP
                                             Default: 1


:end
