Is it possible to put a Windows PC into standby if a specific program is terminated

43 views Asked by At

I would like to put my PC into standby if a specific program is manually stopped. If possible I would like a timeout to allow me to restart the program before the standby is activated.

Is this possible?

Many thanks.

1

There are 1 answers

0
Paul On

As I mentioned in the comment, the solution is to use use a Powershell script. However, as noted the popup does not display if the PowerShell script is executed by the Task Scheduler. The solution is to wrap the PowerShell script in a Visual Basic wrapper script, as described here, and call the VBS script from the Task Scheduler. Not an elegant solution. Give me a Linux cron job anyday...