Xangis Foundation Developer
Posts : 124 Join date : 2011-12-30 Location : Beaverton, OR
| Subject: stop-multiverse.bat Fri 27 Apr - 19:24 | |
| I'm running Windows 7 (Home Premium x64) and stop-multiverse.bat doesn't work because tskill doesn't exist. Taskkill does, and it does the trick with slightly different syntax (taskkill /PID %pid% /F). Here's how I modified the file to work for stopping services on Win7: - Code:
-
@echo off
:: Check that script is being run from mv_home\bin if not defined MV_HOME ( echo MV_HOME is not defined, using relative paths if exist .\start-multiverse.bat ( set MV_HOME=.. ) else ( echo Batch script must be run from MV_HOME\bin directory! exit ) )
if exist run\%MV_WORLDNAME%\combat.bat ( call run\%MV_WORLDNAME%\combat.bat ) echo Stopping combat server process ID %pid% taskkill /PID %pid% /F
if exist run\%MV_WORLDNAME%\instance.bat ( call run\%MV_WORLDNAME%\instance.bat ) echo Stopping instance server process ID %pid% taskkill /PID %pid% /F
if exist run\%MV_WORLDNAME%\login_manager.bat ( call run\%MV_WORLDNAME%\login_manager.bat ) echo Stopping login mangaer server process ID %pid% taskkill /PID %pid% /F
if exist run\%MV_WORLDNAME%\mobserver.bat ( call run\%MV_WORLDNAME%\mobserver.bat ) echo Stopping mob server process ID %pid% taskkill /PID %pid% /F
if exist run\%MV_WORLDNAME%\objmgr.bat ( call run\%MV_WORLDNAME%\objmgr.bat ) echo Stopping object manager server process ID %pid% taskkill /PID %pid% /F
if exist run\%MV_WORLDNAME%\proxy_1.bat ( call run\%MV_WORLDNAME%\proxy_1.bat ) echo Stopping proxy server process ID %pid% taskkill /PID %pid% /F
if exist run\%MV_WORLDNAME%\startup.bat ( call run\%MV_WORLDNAME%\startup.bat ) echo Stopping startup monitor server process ID %pid% taskkill /PID %pid% /F
if exist run\%MV_WORLDNAME%\voiceserver.bat ( call run\%MV_WORLDNAME%\voiceserver.bat ) echo Stopping voice server process ID %pid% taskkill /PID %pid% /F
if exist run\%MV_WORLDNAME%\wmgr_1.bat ( call run\%MV_WORLDNAME%\wmgr_1.bat ) echo Stopping world manager server process ID %pid% taskkill /PID %pid% /F
if exist run\%MV_WORLDNAME%\combat.bat ( call run\%MV_WORLDNAME%\domain.bat ) echo Stopping message domain server process ID %pid% taskkill /PID %pid% /F
:exit I tried this on my Windows XP Pro machine and it worked because that box has both taskkill and tskill commands. I don't know what non-pro has or what Vista has, but taskkill might be supported on more systems. Feel free to use or not use my modifications as you see fit. | |
|