So I have a batch that continues in a infinitive loop. If I run the batch through cmd I can use Ctrl+C
which will stop the batch and give me an summary of the output like:
Started 12:07:13.512876
End 12:07:14.824966
Captured for 0:00:01.312090
So I tried using this:
Start /B program.exe > "C:\text.txt"
:: Timeout
Timeout /T 60
:: Kill the exe...
TASKKILL /T /F /IM cmd.exe
This will just end the output from the batch in the middle of a sentence where Ctrl-C
lets the batch continue its sentence and gives me a summary. Is there any way to use Ctrl-C
like taskkill
? Because I still want to end the process after X
amount of time.
Comments
Post a Comment