[Request] Batch Restarter

Results 1 to 7 of 7
  1. #1
    Sorcerer Supreme HellFire is offline
    Member +Rank
    Dec 2006 Join Date
    271Posts

    [Request] Batch Restarter

    I know that there exists such batch code, to check if for ex:

    gameserver.exe is up, and restarts if its down.

    tryed googling, all i could find is: *codes to restart computers/shuwdown computers*


    i know the code is about 2 lines, cant remember:p
    Last edited by DaRkAnGeL; 19-08-08 at 02:58 AM.


  2. #2
    Elite Member IceMan1300 is offline
    Member +Rank
    May 2007 Join Date
    167Posts

    Re: Batch Restarter

    It wouldn't be 2 lines, if it existed.

    Its not possible without:
    a. Forcing the servers to just restart, without the checks, or
    b. An external application to utilise the FindWindow/Ex or other API in an attempt to find the window handle of the application you are seeking.

  3. #3
    Sorcerer Supreme spamman is offline
    Member +Rank
    Jun 2006 Join Date
    in front of my computerLocation
    272Posts

    Re: Batch Restarter

    actually, If you wanted to create one to be manually run when the server is known to be offline, you can set something up for admins to doit. It would first check for the running processes of AIserver.exe, ebenezer.exe, aujard.exe, versionmanager.exe. If they are all still up, /serverdown 3 in ebenezer. delay 5 mins. Allow ebenezer to save any data it can. Then end the processes through the batch file after the delay. Then start ai server.exe delay 1, ebenezer delay 2, aujard, login server. it's very simple.

  4. #4
    Sorcerer Supreme mamaorha is offline
    Member +Rank
    Jun 2007 Join Date
    367Posts

    Re: Batch Restarter

    basicly its possible to do but when i tried to make such bat\exe file i had problams with the maps for some reason i had errors from ai server and ebenzer :S.
    tho i made shut down if u want i can post.
    its go to ebenezer do /down wait 20 sec than kill the 4 proccess its better cuz ai server allways need to shut down manually from task mgr

  5. #5
    Elite Member IceMan1300 is offline
    Member +Rank
    May 2007 Join Date
    167Posts

    Re: Batch Restarter

    Quote Originally Posted by spamman View Post
    actually, If you wanted to create one to be manually run when the server is known to be offline, you can set something up for admins to doit. It would first check for the running processes of AIserver.exe, ebenezer.exe, aujard.exe, versionmanager.exe. If they are all still up, /serverdown 3 in ebenezer. delay 5 mins. Allow ebenezer to save any data it can. Then end the processes through the batch file after the delay. Then start ai server.exe delay 1, ebenezer delay 2, aujard, login server. it's very simple.
    An auto-restarter though is typically an application that detects if the server is offline. Should it be offline/crashed, it will automatically restart the server back up.

    As for the delay, meh. Really, that's.. very hacky.

    PS: As for the problems you're encountering, its because its not started from the right working directory. Personally, I'd use the CreateProcess API to launch it, but that's just me...

  6. #6
    Newbie teletubie is offline
    MemberRank
    Sep 2005 Join Date
    My HomeLocation
    1Posts

    Re: [Request] Batch Restarter

    To launch the server i use a LOADER.BAT with:
    Code:
    cd "C:\KOServer\Login Server"
    start "melosilla" "C:\KOServer\Login Server\mystver.exe"
    @ping -n 22 -w 1000 127.0.0.1 > nul
    cd "C:\KOServer\AIServer"
    start "melosilla" "C:\KOServer\AIServer\AiServer_MY_20050531.exe"
    @ping -n 22 -w 1000 127.0.0.1 > nul
    cd "C:\KOServer\Ebenezer"
    start "melosilla" "C:\KOServer\Ebenezer\1298.exe"
    @ping -n 22 -w 1000 127.0.0.1 > nul
    cd "C:\KOServer\Aujard"
    start "melosilla" "C:\KOServer\Aujard\Fix Auj.exe"
    melosilla= title of the windows change it wathever you want
    ping is used to make a 20 seconds delay
    Server is on c:\KOServer, change all to your current location

    This is NOT a solution for RESTART, you have tu manually kill all your applications from process list.

    Smr

  7. #7
    Sorcerer Supreme mamaorha is offline
    Member +Rank
    Jun 2007 Join Date
    367Posts

    Re: [Request] Batch Restarter

    u can use task kill :P
    lol this is how i shut down my server with autoit
    WinActivate("GameServer Ver - 20041111")
    ControlSend("GameServer Ver - 20041111", "", "","/down")
    ControlSend("GameServer Ver - 20041111", "", "","{ENTER}")
    sleep(50000)
    Run("TASKKILL /F /IM VersionManager.exe")
    Run("TASKKILL /F /IM AiServer.exe")
    Run("TASKKILL /F /IM Ebeneze2r.exe")
    Run("TASKKILL /F /IM Aujard.exe")
    thx for gerydeft for all his help with autoit he explaind me how to use it



Advertisement