batch file - Xampp: Open Apache and MySQL, then Webbrowser -
i need 1 .bat-file which...
- start xampp apache
- start xampp mysql-server
- wait until step 1 , 2 finished
- 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
Post a Comment