Old:Bugs 3.5-Apollo: Stop bat

From The Uniform Server Wiki
Revision as of 20:48, 3 July 2008 by Ric (talk | contribs) (New page: {{Uc nav 3.5 bugs}} '''''Stop.bat''''' == Enhancement == File: '''Stop.bat'''<br> Location: '''*\Uniform Server''' '''''Enhancement'':''' Enclose batch commands between '''pushd %~dp0'''...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Uniform Server 3.5-Apollo known bugs or issues.



File: Stop.bat
Location: *\Uniform Server

Enhancement: Enclose batch commands between pushd %~dp0 and popd forces current working directory to the folder a batch file is located in. On completion restores original calling working directory. Allows remote processes to stop servers.

Proposed changes:

rem Name: Stop Server File
rem Created By: The Uniform Server Development Team
rem Edited Last By: Olajide Olaolorun (empirex)
rem Comment: Tara's new syetm of shutting down the server
rem To Developers: Implemented a new system of server shutdown
rem Proposed enhancement MPG 3-7-08

@echo off
rem working directory current folder 
pushd %~dp0

rem Stop Apache indirectly stops MySQL
udrive\home\admin\program\pskill.exe Apache.exe c

rem ### Check for system error jump to Pause allows error message to be displayed.
if errorlevel 2 goto :PAUSE
goto :END
echo .

rem restore original working directory


Download this file Stop.bat.txt save as Stop.bat and copy to the folder Uniform Server.

Allow it to overwrite the existing file.

Forum reference

Additional information or background can be found on these forum pages.


Proposed solution

See above.

Note: Technically for stopping a single process the above enhancement is not required however if you wish to stop additional processes the structure is in place.


Uc small logo.gif Ric