Sign in to follow this  
Followers 0
NAIL

Stop server(restart) and kill server (no restart) batch files

1 post in this topic

This is the current "Exile Auto Start.bat" file that I am using.

@echo off
color 0a
title Exile Monitor
:Serverstart
echo Launching Server
D: 
cd "D:\ARMA3_EXILE"
echo Exile Server Monitor... Active !
start "Arma3" /min /wait arma3server.exe -mod=@Exile;@RHSAFRF;@RHSUSAF; -servermod=@ExileServer;@infiSTAR_Exile;@addons; -config=D:\ARMA3_EXILE\@ExileServer\config.cfg -port=2302 -profiles=SC -cfg=D:\ARMA3_EXILE\@ExileServer\basic.cfg -name=SC -autoinit -bepath=D:\ARMA3_EXILE\battleye
ping 127.0.0.1 -n 15 >NUL
echo Exile Server Shutdown ... Restarting!
ping 127.0.0.1 -n 5 >NUL
cls
goto Serverstart

I need to write a batch file to KILL this, one that will shut the server down and also kill this auto restart batch.

New to batch files, so any help would be greatly appreciated.  To call "restart" I can use something as simple as 

@echo off
ping 127.0.0.1 -n 5 >NUL
echo.
echo.
echo.
echo Checking for running server and shutting it down if found
echo ping 127.0.0.1 -n 5 >NUL
taskkill /f /im arma3server.exe
echo.
echo.
echo.
echo Server is Stopped
echo ping 127.0.0.1 -n 5 >NUL
echo.
echo.
echo.
ping 127.0.0.1 -n 5 >NUL

Any one want to help me get this right, not just "working"? 

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.