@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 %mysqldir%\data\%COMPUTERNAME%.pid goto stopsvc
echo   ____________________________________________________________
echo  ^|                                                            ^|
echo  ^|    MySQL ËÆºõÃ»ÓÐÔËÐÐ.                                     ^|
echo  ^|____________________________________________________________^|
echo.

:stopsvc
net stop %my_svc%
set errlevel=%errorlevel%
%mysqldir%\bin\mysqld-nt --remove %my_svc%
if not %errlevel%==0 %pause%

prompt
popd
