I needed this for the Windows 10 machine of my mentally retarded brother: WoL (wake-on LAN) for his machine always works when it is in sleep or deep sleep mode, not every now and then fails when fully powered off.
After it is disabled in the UI, you can still perform it with [WayBack] shutdown.exe, so I added these shortcuts first:
Disabling the Shutdown related actions in the UI consists of two steps:
- Removing it from the logon screen using the registry
- Removing it from the user using
gpedit.msc
(which is wrapped in mmc.exe
)
I will try to get the registry changes for the second using [WayBack] RegFromApp – Generate RegEdit .reg file from Registry changes made by application (thanks [WayBack] magicandre1981 for suggesting that at [WayBack] windows – How can I use Process Monitor to detect register changes made by GPEdit modifications? – Super User).
The wrapping mmc.exe
is easiest to obtain using Process Explorer, and RegFromApp likely needs to run in elevated mode.
If that fails, I can try Process Monitor as suggested by [WayBack] Tom Wijsman in [WayBack] command line – Change group policy using windows CMD – Super User.
The reason for the above is that I want to avoid UI based modifications that are hard to script.
Remove Shutdown options from the logon screen
This is just the registry setting below.
It also removes the reboot/hibernate/sleep options from the logon screen, so you need shortcuts for that.
Remove Shutdown for the regular users UI
This can be done using either gpedit.msc
(Group Policy Editor) drilling down to the local policies or secpol.msc
(the Local Policy Editor):
- Drill down to
Local Policies
User Rights Management
- Double click
Shut down the system
- Remove the groups you don’t want the system to shutdown
- Press
OK
to confirm
See the video below how.
I’ve removed the group Users
and kept the group Administrators
to allow ShutDown.
Administrators now do need to execute the above commands (for instance shutdown.exe /h /f
) in with an UAC administrative token enabled!
If you do not want that, add the users that can perform Shutdown commands to a new group, then aadd that group to Shutdown the system
.
If you want to perform this system wide for all users, then it’s faster to change the [WayBack] Windows Explorer NoClose
policy (see also [WayBack] Group Policy Registry Reference).
Read the rest of this entry »
Like this:
Like Loading...