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
4f971e89-eebd-4455-a8de-9e59040e7347: Represents the “Power buttons and lid” subgroup.7640eac0-17a5-4e72-a521-77e2a40f44e6: Represents the “Power button action” setting.
Configuring Action Values
Inside the 7640eac0-17a5-4e72-a521-77e2a40f44e6 key, you
will see two primary DWORD (32-bit) values:
ACSettingIndex: Controls the action when the device is plugged into AC power.DCSettingIndex: Controls the action when the device is running on battery power.
Double-click either value and set the Base to Decimal, then enter one of the following integers into the Value data field:
0: Do nothing1: Sleep2: Hibernate3: Shut down4: Turn off the display
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:
- Set to
2to make the option visible in Advanced Power Settings. - Set to
1to hide the option from Advanced Power Settings.
After modifying these registry entries, restart the computer or switch power plans for the new power button behaviors to take effect.