teamatomic Posted December 15, 2009 Share Posted December 15, 2009 I use the AppServ package for WAMP. I made these bat files to make things a bit easier. wamp.bat start /max wamp1.bat wamp1.bat ECHO OFF CLS :MENU ECHO. ECHO ............................................... ECHO WAMP Master v1.0 ECHO ............................................... ECHO. ECHO 1 - Services Window ECHO 2 - ipconfig /all ECHO 3 - Stop Apache ECHO 4 - Start Apache ECHO 5 - Stop MySQL ECHO 6 - Start MySQL ECHO 9 - EXIT ECHO. ECHO. ECHO - - APACHE sc query Apache2.2 | findstr STATE ECHO. ECHO. ECHO - - MYSQL sc query mysql | findstr STATE ECHO. ECHO. SET /P M=Type your choice, then press ENTER: IF %M%==1 GOTO SERVICES IF %M%==2 GOTO IPCONFIG IF %M%==3 GOTO STOP APACHE IF %M%==4 GOTO START APACHE IF %M%==5 GOTO STOP MYSQL IF %M%==6 GOTO START MYSQL IF %M%==9 GOTO EXIT :SERVICES start services.msc GOTO MENU :IPCONFIG cd\ cd \windows\system32 ipconfig /all pause CLS GOTO MENU :STOP APACHE NET STOP Apache2.2 pause CLS GOTO MENU :START APACHE NET START Apache2.2 pause CLS GOTO MENU :STOP MYSQL NET STOP mysql pause CLS :START MYSQL NET START mysql pause CLS :EXIT EXIT REM NET STOP service || NET START service REM will toggle the service to its other state REM if its running it get stopped REM if its stopped it gets started I placed them in c: and made a shortcut to wamp.bat for my desktop. I use the starter bat to open the cmd window full sizes so I can see all the ipconfig /all output without having to touch the window. HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/185254-bat-script/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.