From 86171b7c2bde1298e44f16756d033ef3a82b531d Mon Sep 17 00:00:00 2001 From: wangchunsheng Date: Fri, 2 Mar 2012 08:00:41 +0000 Subject: [PATCH] * adjust the service bat. --- build/windows/xampp/apache_installservice.bat | 6 +-- .../windows/xampp/apache_uninstallservice.bat | 6 +-- build/windows/xampp/mysql_installservice.bat | 43 ++++++------------- .../windows/xampp/mysql_uninstallservice.bat | 13 +++--- 4 files changed, 23 insertions(+), 45 deletions(-) diff --git a/build/windows/xampp/apache_installservice.bat b/build/windows/xampp/apache_installservice.bat index 6a0ecff7fb..dd00b1b5af 100755 --- a/build/windows/xampp/apache_installservice.bat +++ b/build/windows/xampp/apache_installservice.bat @@ -9,9 +9,9 @@ goto exit :WinNT echo Installing Apache2.2 as an Service -bin\httpd -k install -echo Now we Start Apache2.2 :) -net start Apache2.2 +apache\bin\httpd -k install -n apachezt +echo Now we Start Apache +net start apachezt :exit pause diff --git a/build/windows/xampp/apache_uninstallservice.bat b/build/windows/xampp/apache_uninstallservice.bat index 2ec028ed79..b736918311 100755 --- a/build/windows/xampp/apache_uninstallservice.bat +++ b/build/windows/xampp/apache_uninstallservice.bat @@ -10,9 +10,9 @@ goto exit :WinNT echo Are you sure you wan't this? echo now stopping Apache2.2 when it runs -net stop Apache2.2 -echo Time to say good bye to Apache2.2 :( -bin\httpd -k uninstall +net stop apachezt +echo Time to say good bye to apache2.2 :( +bin\httpd -k uninstall -n apachezt :exit pause diff --git a/build/windows/xampp/mysql_installservice.bat b/build/windows/xampp/mysql_installservice.bat index 902f74d9fa..3c94daa6fb 100755 --- a/build/windows/xampp/mysql_installservice.bat +++ b/build/windows/xampp/mysql_installservice.bat @@ -1,36 +1,17 @@ -@echo off +@echo off -if "%OS%" == "Windows_NT" goto WinNT +if "%OS%" == "Windows_NT" goto WinNT -:Win9X -echo Don't be stupid! Win9x don't know Services -echo Please use mysql_start.bat instead -goto exit +:Win9X +echo Don't be stupid! Win9x don't know Services +echo Please use apache_start.bat instead +goto exit -:WinNT -if exist %windir%\my.ini GOTO CopyINI -if exist c:\my.cnf GOTO CopyCNF -if not exist %windir%\my.ini GOTO MainNT -if not exist c:\my.cnf GOTO MainNT +:WinNT +echo Installing mysql as an Service +mysql\bin\mysqld.exe --install mysqlzt +echo Now we Start mysql :) +net start mysqlzt -:CopyINI -echo Safe the %windir%\my.ini as %windir%\my.ini.old! -copy %windir%\my.ini /-y %windir%\my.ini.old -del %windir%\my.ini -GOTO WinNT - -:CopyCNF -echo Safe the c:\my.cnf as c:\my.cnf.old! -copy c:\my.cnf /-y c:\my.cnf.old -del c:\my.cnf -GOTO WinNT - -:MainNT -echo Installing MySQL as an Service -copy "%cd%\bin\my.cnf" /-y %windir%\my.ini -bin\mysqld --install mysql --defaults-file="%cd%\bin\my.ini" -echo Try to start the MySQL deamon as service ... -net start MySQL - -:exit +:exit pause diff --git a/build/windows/xampp/mysql_uninstallservice.bat b/build/windows/xampp/mysql_uninstallservice.bat index 365751c594..3612337731 100755 --- a/build/windows/xampp/mysql_uninstallservice.bat +++ b/build/windows/xampp/mysql_uninstallservice.bat @@ -4,17 +4,14 @@ if "%OS%" == "Windows_NT" goto WinNT :Win9X echo Don't be stupid! Win9x don't know Services -echo Please use mysql_stop.bat instead +echo Please use apache_stop.bat instead goto exit :WinNT -echo now stopping MySQL when it runs -net stop mysql -echo Uninstalling MySql-Service -bin\mysqld.exe --remove mysql -if not exist %windir%\my.ini GOTO exit -echo Remove %windir%\my.ini -del %windir%\my.ini +echo Are you sure you wan't this? +echo now stopping mysql when it runs +net stop mysqlzt +mysql\bin\mysqld.exe --remove mysqlzt :exit pause