Last active
April 22, 2020 15:15
-
-
Save porteusconf/e6b3254dfc32692bc17c43cb8648214b to your computer and use it in GitHub Desktop.
Hides "shutdown" option in win10 start menu, but still see restrart, sleep, lock, etc. Can still shutdown by other means like Alt-F4 or "shutdown -s" (for any user that has not been blocked.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PolicyManager\default\Start\HideShutDown] | |
"value"=dword:00000001 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use case: folks at home using RDC to connect to work pc (only safe to do thru vpn or rdc-gateway, btw). Just a little history first... When using RDC (Remote Desktop Connection) to a win7 pc, if you (remotely) went to start->shutdown on the work win7, you would see only "logoff" or "disconnect". In remote sessions there would be no "Shutdown" to click on. Of course, shutdown would be visible if you were physically at win7 pc.
For some [inane/insane]reason, Microsoft dropped this great feature from win10, so when you RDC to win10, the "Shutdown" option is visible, and if you inadvertently or by mistake click on "shutdown" on the win10 pc at work, the pc at work will immediately will shut down, usually without even asking you to confirm, i.e. "are you sure?" The above reghack only hides the option for "Shutdown" in the start-menu, leaving others like "Restart", "Logoff", "Sleep", "Lock", etc. This hack affects only what options are available in the start menu, and does not prevent the pc at work from being shutdown by other means like
shutdown -s -t 1
or sending ctrl-alt-del, etc. Note: this reghack hides shutdown both in remote and local sessions, but if physically at the pc, the user could always do a restart, then use power-button to power off the pc at the bios/splash screen. Or maybe we can come up with a shudown script that can sense if we are in remote or local session and ask are you sure for remote sessions (then ask again, are you really really sure? ;-) If local session, it would just do the shutdown without asking.At https://www.kraftkennedy.com/how-to-disable-and-control-shut-down-sleep-functions-in-windows/ are screenshots, and discussion of group policy, wol via sccm, in context of folks using RDC at home, like during covid 19, and inadvertently powering off their win10 pc at work. Also found elsewhere on internet, but I have a win10-1809 pc in domain, and the entire huge "PolicyManager" tree is nowhere to be found anywhere in the registry, so proceed with care...(I'll update here if I figure what is going on, like why the tree is not found.)
We also tried a clutzy work-around to, in effect, ask you "are you sure" instead of doing immediate shutdown. There is a registry setting you to ask for a shutdown reason on every shutdown/restart (Google enable shutdown event tracking.) But we don't use that in most cases, as it can be confusing to most users since they probably have never seen anything like it before.
And there is also other "Hide*" items in same location as HideShutDown like HideSleep for example. In each case, the item is hidden when"value" is 1, and is not hidden if "value" is 0. We do not HideSleep if we know WOL can reliably wake from sleep. Note that just because WOL will wake from most/all sleep-states, does not mean that WOL can power-up a pc from a full power-off state: to wake from full power-off may require disabling certain green power-saving features that are typically on by default in the bios. Some