0

can someone help me out with this?

How do I run a batch file that automatically runs the .exe file when it gets stopped?

0

1 Answer 1

1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .