When pressing the power button on your keyboard, depending on the settings applied by the user, It serves a number of useful tasks, such as turning off the display or putting the PC Into hibernation. As It's name suggests, It's primary function Is to power down the computer. However, users can repeatedly do this and cause the PC to lose functionality. In this tutorial, I will show you how to prevent the power button from shutting down the PC.
During your computing tasks, I'm sure your PC has frozen at least once, whereby It completely lost functionality and the only way to get It up and running again, was to hold the power button, and reboot thereafter. On these grounds, It's perfectly fine,
However, If you have multiple users on your PC such as young children, there's nothing stopping them from repeatedly pressing the power button. In doing so, It does not give the operating system a chance to save settings, hence can cause Instability and/or corruption to the OS.
To prevent this, I will demonstrate how to completely disable the power button's usability, by using the Group Policy Editor that's native to Windows 10 Pro, Enterprise and Education editions. If you have either of these Installed, then this tutorial Is for you. So let's rip Into It.
To access the Group Policy Editor, open the Run menu, enter gpedit.msc and hit OK.
The Group Policy Editor window will now open, so navigate to the following directory.
Computer Configuration > Adminstrative Templates > System > Power Management > Button Settings
Then on the right pane, double-click Select the Power button action (plugged In) and Select the Power button action (on battery).
Apply the following setting to each of the above options. To the left of the window, select the Enabled radio button. Next to Power Button Action, select your preference via the drop-down menu. For the purpose of this tutorial, I've chosen Sleep. This means my computer will enter Sleep mode when pressing the Power button. Hit OK to finalize the process.
Now let's view the changes. Open Windows Settings > System > Power & sleep > Additional power settings. The Power Options will now open, so click on Choose what the power buttons do.
As you can see, both the On battery and Plugged In drop-down menus are grayed out next to When I press the power button:, thus the settings cannot be changed by any user.
Improper shutdown by way of repeatedly holding the power button, can cause system Instability and loss of functionality to some degree. By applying this setting, It prevents such actions In It's entirety. Sure, It can be reversed by clicking on the Not Configured radio button as per Step Three above, but not many users know that this setting actually exists. And that's what makes It so effective.