Looking for "xampp_restart_services.exe"

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Looking for "xampp_restart_services.exe"

Postby mengland » 05. September 2004 12:17

Hello,

Summary

I'm looking for a "xampp_restart_services.exe"-type mechanism that will stop any currently running apache-or-mysql Windows services and then start/restart them. Anything exist today? If not, can this be a feature request for future revs?

Details

While configuring my XAMPP server (mostly for Apache configuration changes), I often restart Apache (and along with it Mysql) by using the xampp_stop.exe and xampp_start.exe in succession.

2 problems:
1) these .exe files only control the non-Windows-service flavors of the Apache/Mysql processes
2) I'd rather just run one script/executable that both stops and then starts xampp (both Apache and Mysql), probably call it "restart".

-Matt
mengland
 
Posts: 13
Joined: 15. August 2004 22:57

Postby Wiedmann » 05. September 2004 13:21

xampp_restart.bat
Code: Select all
@echo off

echo stopping Apache service...
net stop Apache2 >nul 2<&1
if errorlevel 1 (
   echo Apache service could not be stopped / was not started.
) else (
   echo Apache service is stopped.
)
echo.

echo stopping MySQL service...
net stop MySQL >nul 2<&1
if errorlevel 1 (
   echo MySQL service could not be stopped / was not started.
) else (
   echo MySQL service is stopped.
)
echo.

echo starting Apache service...
net start Apache2 >nul 2<&1
if errorlevel 1 (
   echo Apache service could not be started / is not installed.
) else (
   echo Apache service is started.
)
echo.

echo starting MySQL service...
net start MySQL >nul 2<&1
if errorlevel 1 (
   echo MySQL service could not be started / is not installed.
) else (
   echo MySQL service is started.
)
echo.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 56 guests