Waithidden with timeout

I need to run an exe file with a timeout duration
for example after 60 seconds, exe must be ended.

The best way to do this is to use the run or runhidden command followed by a pause while command that will timeout after 60 seconds, then use a command to kill the exe.

What is your usecase?


Example ActionScript for runhidden:

runhidden PATH_TO_EXE\NAME_OF_EXE.exe

Example ActionScript for 60 second pause:

parameter "start" = "{now}"

pause while{ now - (it as time) of (parameter "start") < 60 * second }

The command to kill a process on Windows:

waithidden taskkill /F /T /IM NAME_OF_EXE.exe
3 Likes