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
...
-
Registered
Auto-Restarter in .bat
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
-
-
ʝʮʂʈ ȿѻɱɞ ʘﺎɗ ҨᶖԎ
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.
-
Member
Re: Auto-Restarter in .bat
thanks for sharing but can find other solutions easily
-
ʝʮʂʈ ȿѻɱɞ ʘﺎɗ ҨᶖԎ
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
-
Forum Rules