[Release] Server Starter

06/14/2014 12:22 - DK#16
Quote:
Originally Posted by .Crash View Post
Challenge Acceptet :pimp:

Als .bat abspeichern (Starter.bat z.b.) In Programm Ordner Schmeißen und Fertig :bandit:

Min Win7 bzw server 2008 allerdings vorrausgesetzt :/

Code:
taskkill /F /IM WorldServer.exe
taskkill /F /IM CacheServer.exe
taskkill /F /IM LoginServer.exe
taskkill /F /IM Certifier.exe
taskkill /F /IM CoreServer.exe
taskkill /F /IM DatabaseServer.exe
taskkill /F /IM AccountServer.exe

timeout /T 3

start /MIN AccountServer.exe

timeout /T 10 
start /MIN DatabaseServer.exe

timeout /T 10 
start /MIN CoreServer.exe

timeout /T 10 
start /MIN Certifier.exe

timeout /T 10 
start /MIN LoginServer.exe

timeout /T 10 
start /MIN CacheServer.exe

timeout /T 10 
start WorldServer.exe

Better Bat Code:
PHP Code:
@echo off
:commands
cls
color 0f
echo --------------------
echo 
Commands:
echo --------------------
echo - 
Start 1
echo - Restart 3
echo - Stop 2
echo --------------------
echo 
Please type your commmand below:
set /p command=

if 
'%command%' == 'Start' goto Start
if '%command%' == 'start' goto Start
if '%command%' == '1' goto Start
if '%command%' == 'Restart' goto Restart
if '%command%' == 'restart' goto Restart
if '%command%' == '3' goto Restart
if '%command%' == 'Stop' goto Stop
if '%command%' == 'stop' goto Stop
if '%command%' == '2' goto Stop
goto commands

:Start
Color 4f
echo --------------------

echo 
Starting Account Server...
start /min AccountServer.exe
ping 1.1.1.1 
-n 1 -w 1000>nul

echo Starting Certifier...
start /min Certifier.exe
ping 1.1.1.1 
-n 1 -w 1000>nul

echo Starting Database Server...
start /min DatabaseServer.exe
ping 1.1.1.1 
-n 1 -w 7000>nul

echo Starting Core Server...
start /min CoreServer.exe
ping 1.1.1.1 
-n 1 -w 1000>nul

echo Starting Cache Server...
start /min CacheServer.exe
ping 1.1.1.1 
-n 1 -w 1000>nul

echo Starting Login Server....
start /min LoginServer.exe
ping 1.1.1.1 
-n 1 -w 1000>nul


echo Starting World Server...
start /min WorldServer.exe
ping 1.1.1.1 
-n 1 -w 1000>nul
color 2f
echo --------------------
echo 
Server files loaded.
echo --------------------

ping 1.1.1.1 -n 1 -w 2000>nul

goto commands

:Restart
Color 4f

echo --------------------
taskkill /im AccountServer.exe
taskkill 
/im DatabaseServer.exe
taskkill 
/im CoreServer.exe
taskkill 
/im CacheServer.exe
taskkill 
/im Certifier.exe
taskkill 
/im LoginServer.exe
taskkill 
/im WorldServer.exe
echo --------------------
echo 
Server files closed.
echo --------------------

goto 
start


:stop
Color 4f

echo --------------------
taskkill /im AccountServer.exe
taskkill 
/im DatabaseServer.exe
taskkill 
/im CoreServer.exe
taskkill 
/im CacheServer.exe
taskkill 
/im Certifier.exe
taskkill 
/im LoginServer.exe
taskkill 
/im WorldServer.exe
echo --------------------
echo 
Server files closed.
echo --------------------

ping 1.1.1.1 -n 1 -w 2000>nul

goto commands