can someone help me out with this?
How do I run a batch file that automatically runs the .exe file when it gets stopped?
You can run an inf looping batch like the below to constantly check:
@echo off
:start
cls
tasklist | findstr "theexe"
if %ERRORLEVEL% == 1 goto theexe
if %ERRORLEVEL% == 0 goto start
:theexe
cls
start /d "path" the.exe
goto start
This will constantly check to see if theexe
is running and if it's not run it.
Simplified version thanks to Psycogeek
@echo off
:start
start /d "path" /w the.exe
goto start