@echo off
rem ###################################################
rem # Name: apanel_stop_servers.bat
rem # Location: udrive\home\admin\program
rem # Created By: The Uniform Server Development Team
rem # Edited Last By: MPG (ric)
rem # V 1.0 19-1-2009
rem # Kills Apache, UniController and Virtual drive
rem # Perl can only kill one before itself is killed
rem ##################################################

pushd %~dp0

pskill Apache.exe c
pskill UniController.exe c

rem ## Check if Virtual drive

subst | FIND /I "%1\:" >NUL
IF ERRORLEVEL 1 goto :NOTVIRTUAL
IF ERRORLEVEL 0 goto :VIRTUAL

:NOTVIRTUAL
goto :END

rem ## Is virtual drive hence kill it off
:VIRTUAL
subst %1 /d

:END
pushd %~dp0
Exit

