BO1 auto restarter
-
so this does the job for restarting my bo1 server since the session modify error hasnt been fixed, would there be anyway for me to get how many players are on the server currently in a bat file?
Echo on
:serverstart
cls
start C:\Users\Weedliketoosmoke\Desktop\plutonium-bo2-server!start_zm_server.bat
timeout /t 10
call getCmdPID
set "current_pid=%errorlevel%"
for /f "skip=3 tokens=2 delims= " %%a in ('tasklist /fi "imagename eq cmd.exe"') do (
if "%%a" neq "%current_pid%" (
TASKKILL /PID %%a /f >nul 2>nul
)
)
for /f "skip=3 tokens=2 delims= " %%a in ('tasklist /fi "imagename eq plutonium-bootstrapper-win32.exe"') do (
if "%%a" neq "%current_pid%" (
TASKKILL /PID %%a /f >nul 2>nul
)
)
goto serverstart -
Gonna give this a little bump since it would be incredibly useful..
Or in other words,
Same. -
Gonna give this a little bump since it would be incredibly useful..
Or in other words,
Same.alnoise u need GetCmdPID.exe for it to work put it in the same directory as the bat
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login