How to Change Power Button Action in Regedit

This guide explains how to configure custom hardware power button actions in Windows using the Registry Editor (Regedit). By navigating to specific power management GUIDs in the Windows Registry, you can define what happens when the physical power button is pressed—such as shutting down, sleeping, hibernating, or doing nothing—for both plugged-in and on-battery power states.

Registry Path for Power Button Actions

To configure power button settings directly in the active power scheme, open the Registry Editor by pressing Win + R, typing regedit, and pressing Enter. Navigate to the following path:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\User\PowerSchemes

Under PowerSchemes, locate the subkey corresponding to your active power scheme (the active scheme GUID can be found under the ActivePowerScheme string in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\User\PowerSchemes).

Navigate deeper into the power buttons subgroup and the power button action setting using these GUIDs:

[ActivePowerSchemeGUID]\4f971e89-eebd-4455-a8de-9e59040e7347\7640eac0-17a5-4e72-a521-77e2a40f44e6

Configuring Action Values

Inside the 7640eac0-17a5-4e72-a521-77e2a40f44e6 key, you will see two primary DWORD (32-bit) values:

Double-click either value and set the Base to Decimal, then enter one of the following integers into the Value data field:

Click OK to save the changes.

Unhiding the Power Button Setting in the GUI

If you want to make the power button action visible in the standard Windows Power Options Control Panel interface, navigate to:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\4f971e89-eebd-4455-a8de-9e59040e7347\7640eac0-17a5-4e72-a521-77e2a40f44e6

Locate the Attributes DWORD value and modify it:

After modifying these registry entries, restart the computer or switch power plans for the new power button behaviors to take effect.