@echo off
:begin
tasklist | findstr /c:httpd.exe > nul
if "%errorlevel%" == "0" echo %errorlevel% > nul && taskkill /f /im httpd.exe > nul && echo [httpd service stop]
tasklist | findstr /c:mysqld.exe > nul
if "%errorlevel%" == "0" echo %errorlevel% > nul && taskkill /f /im mysqld.exe > nul && echo [mysqld service stop]
pause
cls
cmd /c start cmd /c start /min D:\amp\httpd-2.4.25-x86\Apache24\bin\httpd.exe && echo {httpd service start}
cmd /c start cmd /c start /min D:\amp\mysql-noinstall-5.0.96-win32\mysql-5.0.96-win32\bin\mysqld.exe && echo {mysqld service start}
pause
cls
:loop
tasklist | findstr /c:httpd.exe > nul
if "%errorlevel%" == "0" echo %errorlevel% > nul && taskkill /f /im httpd.exe > nul && echo [httpd service stop]
pause
:eof
cls
cmd /c start cmd /c start /min D:\amp\httpd-2.4.25-x86\Apache24\bin\httpd.exe && echo {httpd service start}
tasklist | findstr /c:httpd.exe > nul
if "%errorlevel%" == "0" echo {mysqld service start}
pause
cls
:begin
tasklist | findstr /c:httpd.exe > nul
if "%errorlevel%" == "0" echo %errorlevel% > nul && taskkill /f /im httpd.exe > nul && echo [httpd service stop]
tasklist | findstr /c:mysqld.exe > nul
if "%errorlevel%" == "0" echo %errorlevel% > nul && taskkill /f /im mysqld.exe > nul && echo [mysqld service stop]
pause
cls
cmd /c start cmd /c start /min D:\amp\httpd-2.4.25-x86\Apache24\bin\httpd.exe && echo {httpd service start}
cmd /c start cmd /c start /min D:\amp\mysql-noinstall-5.0.96-win32\mysql-5.0.96-win32\bin\mysqld.exe && echo {mysqld service start}
pause
cls
:loop
tasklist | findstr /c:httpd.exe > nul
if "%errorlevel%" == "0" echo %errorlevel% > nul && taskkill /f /im httpd.exe > nul && echo [httpd service stop]
pause
:eof
cls
cmd /c start cmd /c start /min D:\amp\httpd-2.4.25-x86\Apache24\bin\httpd.exe && echo {httpd service start}
tasklist | findstr /c:httpd.exe > nul
if "%errorlevel%" == "0" echo {mysqld service start}
pause
cls
goto loop
##########################################################################################################################
@echo off
:loop
taskkill /f /im httpd.exe
taskkill /f /im mysqld.exe
pause
:eof
cmd /c start cmd /c start /min D:\amp\httpd-2.4.25-x86\Apache24\bin\httpd.exe
cmd /c start cmd /c start /min D:\amp\mysql-noinstall-5.0.96-win32\mysql-5.0.96-win32\bin\mysqld.exe
:: --defaults-file D:\amp\httpd-2.4.25-x86\Apache24\bin\my_huge.ini
pause
cls
goto loop