I have to restart a program after waking up the laptop. The trigger is working (https://www.sevenforums.com/general-discussion/308855-using-task-scheduler-restart-program-upon-wake-sleep.html)
Then I have 2 actions:
- taskkill /f /im "Silent Option.exe"
- start a .bat file which contains:
@echo off
timeout 5 > nul
start /min "" "C:\Program Files (x86)\Silent Option\Silent Option\Silent Option.exe"
The reason Im running a bat, is because if I put start /min "" "blabla.exe" on action 2) , it actually doesnt do anything.
I tried with "start" and the rest as parameters, and the whole start /min "" "blabla.exe" ,but none of them work. I also need to delay the start of the program for at least 3 seconds.
Is there a way to get rid of the .bat?
If not, how could I trigger one task once another task started? Like Task1 to taskkill the .exe and Task2 to start the .exe with the built-in task scheduler delay option?