@echo off 

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 

: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


:CopyINI 

:CopyCNF 

:MainNT 
echo Installing MySQL as an Service 
C:\vansql\mysql\bin\mysqld-nt --install GISmysql --defaults-file="C:\vansql\mysql\bin\my.cnf"
echo Try to start the MySQL deamon as service ... 
net start GISmysql

:exit 

