Welcome to the RaGEZONE - MMORPG development forums.

Auto-Restarter in .bat

This is a discussion on Auto-Restarter in .bat within the Priston Tale Tutorials forums, part of the Priston Tale category; Auto-Restarter in .bat to server! Code: ////////////////////////////////////////////////// ///// Priston Tale Restart Server Fusion ///////// ////////////////////////////////////////////////// echo off title "Auto-Restarter" cls ...

Results 1 to 4 of 4
  1. #1
    Registered
    Rank
    Member
    Join Date
    Jan 2011
    Location
    Atlantis
    Posts
    9
    Liked
    1

    Auto-Restarter in .bat

    Click
    Auto-Restarter in .bat to server!
    Code:
    //////////////////////////////////////////////////
    ///// Priston Tale Restart Server Fusion /////////
    //////////////////////////////////////////////////
    echo off
    title "Auto-Restarter"
    cls
    :hell
    start "Server.exe" /min /normal /wait Server.exe
    echo :::::::::::::::::::::::::::::::::::::
    echo :: The server was restarted ::
    echo :::::::::::::::::::::::::::::::::::::
    goto :hell
    //////////////////////////////////////////////////
    ///// Priston Tale Restart Server Fusion /////////
    //////////////////////////////////////////////////
    Save the extension in .bat
    example: Restart.bat

  2. #2
    ʝʮʂʈ ȿѻɱɞ ʘﺎɗ ҨᶖԎ
    Rank
    Moderator
    Join Date
    May 2007
    Location
    UK
    Posts
    5,333
    Liked
    1172

    Re: Auto-Restarter in .bat

    You could save with extension .cmd like Restart.cmd too, which is actually correct for NT (not 9x) based Windows versions. (or OS/2... BATch files are a DOS legacy, and this would work for anything from OS/2 v2 or NT4 but not DOS. It *will* work in >=Win98 too.)

    If you add
    Code:
    echo %date% %time% Server restarted >> Restart.log
    between the start and the goto, you will get a file log too. Your OS must be Windows 2000 or newer though.

    --- EDIT ---
    Oh yea... if the console Window is too annoying, or too easy to close, you can use hstart (free, so long as you don't package it with anything else)

    Create a shortcut to your script, and change it's Target property to "C:/path/to/hStart.exe /NOCONSOLE" "C:/path/to/Restart.bat" modifying the full paths and shell script name as appropriate.
    Last edited by bobsobol; 23-01-11 at 03:02 PM.

    I will not respond to any request for Email or Remote Desktop YIM, ICQ, MSN etc.

  3. #3
    Member
    Rank
    Member
    Join Date
    Nov 2010
    Posts
    31
    Liked
    13

    Re: Auto-Restarter in .bat

    thanks for sharing but can find other solutions easily

  4. #4
    ʝʮʂʈ ȿѻɱɞ ʘﺎɗ ҨᶖԎ
    Rank
    Moderator
    Join Date
    May 2007
    Location
    UK
    Posts
    5,333
    Liked
    1172

    Re: Auto-Restarter in .bat

    It's not really a matter of finding other solutions. The nice thing about this is that Trough gives complete and well documented source code... this can show how to attempt other methods of your own, where a binary executable is just "do it our way or find something else" you can't adapt it.

    I will not respond to any request for Email or Remote Desktop YIM, ICQ, MSN etc.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •