1
I'm trying to find a way to shutdown my PC when it starts up and no one logs in for 5 minutes (or some other specified time).
I've found similar tasks that try to shutdown the PC when it is idle.
The problem is that if an antivirus program or anything else is running in background, then these tasks don't work because the the PC is "never" idle.
My system is running Windows 8.1.
Use Task sheduler. Insert
shutdown /s /f /t 300
task with a trigger of "system starts" plus a trigger of "user logoff" andshutdown /a
task with a trigger of "user logon". All tasks must be executed with administrator account. PS. Sorry, I cannot find real names of events in english. – Akina – 2018-08-03T09:26:28.307@Akina sounds like an answer to me. Why not submit it as one? OP can then accept it if it works, and we all know he doesn't need further help. – LPChip – 2018-08-03T09:46:00.727
@LPChip I have never tested cross-user shutdown. I am not sure that it will work correctly. And I don't want to test it. – Akina – 2018-08-03T09:47:24.933
@Akina it will work fine. It's OK to post an answer you've not tested. You can state this in your answer so others are aware you haven't tested it. – I say Reinstate Monica – 2018-08-03T11:13:57.840
@TwistyImpersonator I am afraid it will not work correctly in a scenario: user1 logged in, user2 logged in using fast user switching, any user log off... 5 min and shutdown. – Akina – 2018-08-03T11:27:12.680
1@akina The OP didn't mention having the system shut down 5 minutes after a user logs off...Only 5 minutes after the system starts (If no one logs on). Trigger the shutdown at system start, and cancel the logon when any user logs on. That will work and be what the OP asked. – I say Reinstate Monica – 2018-08-03T11:30:33.240
@TwistyImpersonator Maybe you're right... I edit my answer. – Akina – 2018-08-03T11:36:14.303