How can I add a warning before I turn off my computer?

2

I want to use TeamViewer on my work PC to work from home when I need to. Being a creature of habit I'm afraid i'll click the shutdown button on the friday before the week-end when I need it the most...

How could I add a warning with a friendly reminder to confirm the shutdown possibly with a message saying "Hey are you sure you won't need to access this computer?"

I cannot make my work PC Wake On LAN so it would have to stay on.

System: Windows 7 Pro 64-bit

PS: I'll take advice on other remote desktop solutions

Sébastien

Posted 2014-02-20T22:28:31.050

Reputation: 475

1Use a scheduled task that runs a simple program – Ramhound – 2014-02-20T22:30:43.197

Thanks, I'm now looking at Windows Task Scheduler but I can't find the shutdown event. Note that I am now at home on Windows 8.1 (and both my PCs are French). Do you have any specific pointer? – Sébastien – 2014-02-20T22:38:40.577

Answers

3

You could use the Shutdown Event Tracker for this. It will stop you from shutting down or restarting the computer without providing a reason.

Overkill? You decide.

Michael Frank

Posted 2014-02-20T22:28:31.050

Reputation: 7 412

Good idea. That's actually what we use on our Windows Server 2008... I'll check this out. – Sébastien – 2014-02-20T22:42:33.547

4Reason for shutdown? "I don't want to do any work this weekend." – Michael Frank – 2014-02-20T22:43:58.743

I just tried this and it works on my Windows 8.1. Thanks a lot! – Sébastien – 2014-02-20T22:50:48.877

This would usually require the Group Policy Editor (gpedit.msc), which is only available in Professional and higher editions. As a workaround, open a command prompt with admin rights, and run the following command: reg add "HKLM\Software\Policies\Microsoft\Windows NT\Reliability" /v "ShutdownReasonUI" /t REG_DWORD /d 1 /f. Changes are applied immediately. – and31415 – 2014-02-22T15:57:05.060

2

You can use the Local Group Policy Editor to remove the options to power off, restart etc. from the start menu.

Note: This only works with the Professional or Ultimate edition of Win7, not with Home, and requires local admin privileges.

The steps are:

  • run gpedit.msc
  • under User Configuration / Administrative Templates / Start Menu and Taskbar there is a setting to remove access to the shutdown commands

There is a detailed explanation on howtogeek.com.

sleske

Posted 2014-02-20T22:28:31.050

Reputation: 19 887

1Thanks, but that seems a bit too drastic. I'd like to still have the option to shutdown the usual way, just with an extra step. – Sébastien – 2014-02-20T22:41:14.603

You could still shutdown with the power button. – kobaltz – 2014-02-21T00:47:21.760

I never go to the shutdown option - I just run the command shutdown -s -t 1 when I want to shutdown. Or shutdown -r -t 1 when I want to reboot from an admin level command prompt. You COULD create a shortcut to that too. Or increase the time delay from 1 second (-t 1) to something like -t 300 (5 minutes) so if you realize you shutdown the wrong system, you can cancel the shutdown with shutdown -a – Multiverse IT – 2014-02-21T01:33:34.937