batch file - Xampp: Open Apache and MySQL, then Webbrowser -


i need 1 .bat-file which...

  1. start xampp apache
  2. start xampp mysql-server
  3. wait until step 1 , 2 finished
  4. open webbrowser , navigate localhost

i tryed combine .bat-files xampp-folder, it's stopping @ apache 2 starting ...

here file:

@echo off cd /d %~dp0 echo please close command shutdown echo apache 2 starting ...  apache\bin\httpd.exe  cd /d %~dp0 echo please dont close window while mysql running echo mysql trying start echo please wait  ... echo mysql starting mysql\bin\my.ini (console)  mysql\bin\mysqld --defaults-file=mysql\bin\my.ini --standalone --console    "c:\program files (x86)\google\chrome\application\chrome.exe" sleep1 start "localhost" "http://localhost" 

i'm not expert batch files example wrote myself. launches xampp control-panel ( can configured auto start apache , mysql modules ), browser , editor ( firefox , notepad++ example ). if xampp started same programs closed.

@echo off tasklist /fi "imagename eq xampp-control.exe" | findstr /i "xampp-control.exe" && (     taskkill /im firefox.exe     taskkill /im notepad++.exe     cd "c:\xampp"     call apache_stop.bat     call mysql_stop.bat     taskkill /f /im xampp-control.exe ) || (     start c:\xampp\xampp-control.exe     cd "c:\program files\notepad++"     start notepad++.exe     cd "c:\program files\mozilla firefox"     start firefox.exe http://localhost/ ) exit 

Comments

Popular posts from this blog

c# - SharpSsh Command Execution -

python - Specify path of savefig with pylab or matplotlib -

How to run C# code using mono without Xamarin in Android? -