@echo off


setlocal enableextensions
if exist Pn\Config.cmd pushd . & goto cfg
if exist ..\Pn\Config.cmd pushd .. & goto cfg
goto :eof

:cfg
call Pn\Config.cmd
prompt -$g

if exist %apadir%\logs\httpd.pid goto stopsvc
echo   ____________________________________________________________
echo  ^|                                                            ^|
echo  ^|    Apache ËÆºõÃ»ÓÐÔËÐÐ.                                    ^|
echo  ^|____________________________________________________________^|
echo.

:stopsvc
pushd %apadir%
bin\httpd.exe -k stop -n %htd_svc%
set errno=%errorlevel%
bin\httpd.exe -k uninstall -n %htd_svc%
set /a errno=%errno%+%errorlevel%


if %errno% GTR 0 %pause%

if exist %homedrive%\ZendOptimizer_errors.txt del %homedrive%\ZendOptimizer_errors.txt /q

prompt
popd
