Itutorial
Legendary OT User
- Joined
- Dec 23, 2014
- Messages
- 2,339
- Solutions
- 68
- Reaction score
- 1,024
I know there are 10000 but this one was the only one that worked for me. Very simple.
.bat file set up
Keep in mind that what ever your server file is called is what needs to be put for the IMAGENAME.... So if the compiler is called Otserv.exe it needs to be...... "IMAGENAME eq Otserv.exe"
.bat file set up
Code:
@echo off
:START
tasklist /FI "IMAGENAME eq TheForgottenServer.exe" 2>NUL | find /I /N "TheForgottenServer.exe">NUL
if "%ERRORLEVEL%"=="0" GOTO START
if "%ERRORLEVEL%"=="1" GOTO LAUNCHPROGRAM
:LAUNCHPROGRAM
start "" "C:\Users\dakine053\Desktop\TFS\TheForgottenServer.exe"
GOTO START
Keep in mind that what ever your server file is called is what needs to be put for the IMAGENAME.... So if the compiler is called Otserv.exe it needs to be...... "IMAGENAME eq Otserv.exe"