Official Community Forums
HomeHome  FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  Log in  The Wiki  Website  github Project  

Share | 


View previous topic View next topic Go down 
Foundation Developer

Posts : 124
Join date : 2011-12-30
Location : Beaverton, OR

PostSubject: 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:

@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!

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


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. Smile
Back to top Go down
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
» Stop Animal Abuse Club
» Stop the shame! (The Recent U.S. 'Publicised' Shootings)
» Walking Animation won't stop
» Livestreams stop
» Transformers Multiverse fan comic project

Permissions in this forum:You cannot reply to topics in this forum
 :: Development :: Server Scripting and Development-
Jump to: