TITLE UNIFORM SERVER - Install and Run as Service
cls
:######################################################################## 
:# File name: Run.bat
:# Created By: The Uniform Server Development Team
:# Edited Last By: Mike Gleaves (ric) 
:# V 1.0 23-1-2009
:########################################################################
@echo off
COLOR B0
mode con:cols=100 lines=40
echo.

rem working directory current folder 
pushd %~dp0

..\..\home\admin\program\pskill.exe Apache.exe >nul
IF NOT ERRORLEVEL 1 goto :APACHERUNNING

..\..\home\admin\program\pskill.exe mysqld-opt.exe >nul
IF NOT ERRORLEVEL 1 goto :MYSQLRUNNING

..\..\usr\bin\perl w2c1.pl
goto to END

:APACHERUNNING
echo.
echo  Apache running
..\..\home\admin\program\pskill.exe mysqld-opt.exe >nul
IF ERRORLEVEL 1 goto :NOTMYSQLRUNNING
:MYSQLRUNNING
echo.
echo  MySQL running

:NOTMYSQLRUNNING
echo.
echo  To successfully install servers as a service
echo  both Apache and MySQL servers must be stopped.
echo.
echo  Please close running servers and rerun this script.
echo. 

pause
:END

rem restore original working directory
popd