invTempestJoin Date: 2003-03-02Member: 14223Members, Constellation, Squad Five Blue
To create a batch file first make a new text document and copy in the contents below (make sure to change all variables below to fit your server setup)
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->@echo off title NS2 Server Monitor cd "$ServerDirectory" :NS2 echo (%time%) Server started. start /wait server.exe $CommandLineArg1 $CommandLineArg2 echo (%time%) WARNING: NS2 closed or crashed, restarting. goto NS2<!--c2--></div><!--ec2-->
Then simply save the file with the extension .bat and call it something like NS2server.bat.
Place this file on your desktop for easy access as this will be how you start the server from now on.
Comments
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->@echo off
title NS2 Server Monitor
cd "c:\servers\pub1\"
:NS2
echo (%time%) Server started.
start /wait server.exe -file c:\servers\pub1\server.xml -adminpath pub1/
echo (%time%) WARNING: NS2 closed or crashed, restarting.
goto NS2<!--c2--></div><!--ec2-->
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->@echo off
title NS2 Server Monitor
cd "$ServerDirectory"
:NS2
echo (%time%) Server started.
start /wait server.exe $CommandLineArg1 $CommandLineArg2
echo (%time%) WARNING: NS2 closed or crashed, restarting.
goto NS2<!--c2--></div><!--ec2-->
Then simply save the file with the extension .bat and call it something like NS2server.bat.
Place this file on your desktop for easy access as this will be how you start the server from now on.