Startup.bat Autorestarts the server after crash

Page:1  

  • UNU

    Startup if x64 else x32 bit link http://www.mediafire.com/download/vsffdevpsnhsd7l/startfromServer.rar ::Please, change following lines if your ServerFolder and GameFolder is not at C:\\Games\\Crysis-Modders-Server\\CrysisSAFE\\ @echo off ::--------------------------------------------------------- set GameFolder=C:\\Games\\Crysis-Modders-Server\\CrysisSAFE\\ ::--------------------------------------------------------- set ServerFolder=\"C:\\Games\\Crysis-Modders-Server\\CrysisSAFE\\ServerFolder\" ::--------------------------------------------------------- ::--------------------------------------------------------- cd %GameFolder% if exist \"%PROGRAMFILES(X86)%\" ( start Bin64\\CrysisDedicatedServer.exe -root %ServerFolder% +exec \"server.cfg\" -mod SafeWriting ) ELSE ( start Bin32\\CrysisDedicatedServer.exe -root %ServerFolder% +exec \"server.cfg\" -mod SafeWriting ) echo Server Started :loop tasklist /fi \"imagename eq WerFault.exe\" | find /i \"WerFault.exe\" > nul if not errorlevel 1 ( taskkill /IM \"WerFault.exe\" /F > nul tasklist /fi \"imagename eq CrysisDedicatedServer.exe\" | find /i \"CrysisDedicatedServer.exe\" > nul if not errorlevel 1 ( taskkill /IM \"CrysisDedicatedServer.exe\" /F > nul ) > nul echo Server Crashed please wait ... TIMEOUT 5 >nul echo Restarting server please wait ... if exist \"%PROGRAMFILES(X86)%\" ( start Bin64\\CrysisDedicatedServer.exe -root %ServerFolder% +exec \"server.cfg\" -mod SafeWriting ) ELSE ( start Bin32\\CrysisDedicatedServer.exe -root %ServerFolder% +exec \"server.cfg\" -mod SafeWriting ) TIMEOUT 3 >nul echo Server Restarted ) TIMEOUT 5 >nul goto loop

    ❤️ 0
  • UNU

    Hi i have updated the start.bat file here it is link http://www.mediafire.com/download/n3bckzug2nad8dk/StartServer.rar and code ::Please, change following lines if your ServerFolder and GameFolder is not at C:\\Games\\Crysis-Modders-Server\\CrysisSAFE\\ @echo off ::--------------------------------------------------------- set GameFolder=C:\\Games\\Crysis-Modders-Server\\CrysisSAFE\\ ::--------------------------------------------------------- set ServerFolder=\"C:\\Games\\Crysis-Modders-Server\\CrysisSAFE\\ServerFolder\" ::--------------------------------------------------------- ::--------------------------------------------------------- set num=1 mode con:cols=80 lines=40 >nul mode con:top=10 >nul title Crysis SSMSafeWriting Server Starter cd %GameFolder% timeout 1 >nul MD IfyouSeeMeDeleteME >nul attrib +h IfyouSeeMeDeleteME /s /d >nul cd IfyouSeeMeDeleteME cls TIMEOUT 1 >nul SET /P \".= -------------------------- [\"<nul SET /P \".= ]-----------------------------------\"<nul>\"Starting Server\" findstr /A:0a /S /C:\"]-----------------------------------\" \"Starting Server\" echo. SET /P \".= -------------------------- [\"<nul SET /P \".= ]-------------------------------\"<nul>\"You want to proceed\" findstr /A:0a /S /C:\"]-------------------------------\" \"You want to proceed\" echo. ::echo ---------------- [ Starting Server ] -------------------------- ::echo ---------------- [ Do you want to proceed ? ] -------------------------- pause cls cd.. cd %GameFolder% if exist \"%PROGRAMFILES(X86)%\" (start Bin64\\CrysisDedicatedServer.exe -root %ServerFolder% +exec \"server.cfg\" -mod SafeWriting) ELSE (start Bin32\\CrysisDedicatedServer.exe -root %ServerFolder% +exec \"server.cfg\" -mod SafeWriting ) >nul cd %GameFolder%\\IfyouSeeMeDeleteME ::echo ---------------- [ Server Started ] -------------------------------------------- SET /P \".= -------------------------- [\"<nul SET /P \".= ]-----------------------------------\"<nul>\"Server Started\" findstr /A:0a /S /C:\"]-----------------------------------\" \"Server Started\" echo. :loop cd %GameFolder% if exist IfyouSeeMeDeleteME ( RD /S /Q IfyouSeeMeDeleteME >nul )>nul tasklist /fi \"imagename eq WerFault.exe\" | find /i \"WerFault.exe\" >nul if not errorlevel 1 ( taskkill /IM \"CrysisDedicatedServer.exe\" /F >nul taskkill /IM \"WerFault.exe\" /F >nul if not exist IfyouSeeMeDeleteME ( MD IfyouSeeMeDeleteME >nul attrib +h IfyouSeeMeDeleteME /s /d >nul cd IfyouSeeMeDeleteME cls ) if %num% EQU 0 ( set /A num=1 ) set /A num=num+1 ::echo ---------------- [ Server Crashed please wait ... ] ---------------------------- SET /P \".= -------------------------- [\"<nul SET /P \".= ]-----------\"<nul>\"Server Crashed please wait Crashed NR %num%\" findstr /A:0c /S /C:\"]-----------\" \"Server Crashed please wait Crashed NR %num%\" echo. TIMEOUT 5 >nul echo -------------------------- [Restarting server please wait...]------------------- cd %GameFolder% if exist \"%PROGRAMFILES(X86)%\" (start Bin64\\CrysisDedicatedServer.exe -root %ServerFolder% +exec \"server.cfg\" -mod SafeWriting ) ELSE (start Bin32\\CrysisDedicatedServer.exe -root %ServerFolder% +exec \"server.cfg\" -mod SafeWriting ) >nul TIMEOUT 3 >nul ::echo ---------------- [ Server Restarted ] ------------------------------------------ cd %GameFolder%\\IfyouSeeMeDeleteME SET /P \".= -------------------------- [\"<nul SET /P \".= ]----------------------------------\"<nul>\"Server Restarted\" findstr /A:0a /S /C:\"]----------------------------------\" \"Server Restarted\" echo. TIMEOUT 3 >nul ) tasklist /fi \"imagename eq CrysisDedicatedServer.exe\" | find /i \"CrysisDedicatedServer.exe\" >nul if errorlevel 1 ( TIMEOUT 1 >nul ::echo ---------------- [ Server Not Detected/Closed ] -------------------------------- ::echo ---------------- [ Restarting Server ] ----------------------------------------- cd %GameFolder% if not exist IfyouSeeMeDeleteME ( MD IfyouSeeMeDeleteME attrib +h IfyouSeeMeDeleteME /s /d cd IfyouSeeMeDeleteME cls ) SET /P \".= -------------------------- [\"<nul SET /P \".= ]-------------------------------------\"<nul>\"Server Closed\" findstr /A:0c /S /C:\"]-------------------------------------\" \"Server Closed\" echo. ::echo -------------------------- [Restarting Server:]---------------------------------- SET /P \".= -------------------------- [\"<nul SET /P \".= ]---------------------------------\"<nul>\"Restarting Server\" findstr /A:0e /S /C:\"]---------------------------------\" \"Restarting Server\" echo. TIMEOUT 3 >nul cd %GameFolder% if exist \"%PROGRAMFILES(X86)%\" (start Bin64\\CrysisDedicatedServer.exe -root %ServerFolder% +exec \"server.cfg\" -mod SafeWriting) ELSE (start Bin32\\CrysisDedicatedServer.exe -root %ServerFolder% +exec \"server.cfg\" -mod SafeWriting ) >nul ::echo ---------------- [ Server Restarted ] ------------------------------------------ cd %GameFolder%\\IfyouSeeMeDeleteME SET /P \".= -------------------------- [\"<nul SET /P \".= ]----------------------------------\"<nul>\"Server Restarted\" findstr /A:0a /S /C:\"]----------------------------------\" \"Server Restarted\" echo. ) TIMEOUT 10 >nul goto loop

    ❤️ 0
Page:1