How to Change the Power Button Settings in Windows

When starting up our computer, it has a dedicated button for it. In the event that we press this button with the computer running, the sleep mode will be activated by default. However, Windows allows you to configure the action of this button so that instead of suspending the system you can perform other actions such as turning off the screen, turning off the system, entering hibernate mode or deactivating it and doing nothing. This can be very useful in different situations so today we are going to show you different ways to carry out any change on the action of this button.

Being able to change the behavior of the on and off button can be especially useful in many scenarios. For example, in the case that we have a laptop and we want that, when pressing the button, it enters hibernation mode instead of suspension in order to save more battery. It may also be interesting, if we have a desktop PC, that when pressing the button it goes into sleep mode instead of turning off the equipment, in order to be able to resume the device more quickly at the same point where it was we leave.

Change the Power Button Settings in Windows

Of course, we must bear in mind that the action to configure the button is carried out when we click on it. If we hold down the shutdown button, we will be causing the system to force shutdown, which can cause damage to the equipment, so we must be careful in this regard.

Configure button from Control Panel

We can change the settings of the on and off button from the Control Panel. To access it we must write control panel in the search box located next to the Start menu. Once it appears, click on “System and security” and “Power options”. Here on the left side, click on the option “Choose the behavior of the start / stop buttons”.

Elegir comportamiento de los botones de inicio y apagado

We now go to the next screen where we can distinguish between what we want to do when we press the power button of the equipment, whether we are using the battery or when the PC is connected to the electrical network. In the case that we use a desktop PC, only the option of electric current will appear.

Cambiar acción al presionar el botón de inicio y apagado

In each of the cases, if we display the list of options, we find different options such as:

  • Do nothing.
  • Lay off.
  • To turn off.
  • Turn off the screen.
  • Hibernate (not on all computers).

From here we can use the function that interests us the most and change it every time we need it. If, for example, we use a laptop, the option to Turn off the screen can be quite useful, since in this case we do not have an external screen with its own on and off button, as we do in the case of a PC of desktop.

In addition, we must bear in mind that, depending on the hardware of our equipment, the configuration may be different. For example , the Hibernate option is not compatible with all systems , so it may appear in some cases and not in others (as in our case).

Once the new function has been chosen, we only have to press the “Save changes” button that we find at the bottom of the screen so that the configuration of the on and off button becomes effective.

Change button settings from Command Prompt

It is also possible to change the power button settings using the command line from the Command Prompt. If we want to define a new action for the button, we must start by typing CMD in the search box next to the Start menu. This will make the Command Prompt option appear in the list that we must run as administrator. Once it appears, we must write a command to change the default action of the on and off button and press Enter to confirm.

  • To change the default action when the PC is connected to the network we use the command:

powercfg -setacvalueindex SCHEME_CURRENT 4f971e89-eebd-4455-a8de-9e59040e7347 7648efa3-dd9c-4e3e-b566-50f929386280 0

  • To change the default action when the PC is using the battery we use the command:

powercfg -setdcvalueindex SCHEME_CURRENT 4f971e89-eebd-4455-a8de-9e59040e7347 7648efa3-dd9c-4e3e-b566-50f929386280 0

CMD Definir nueva acción para el botón de inicio y apagado

As we can see, both commands end with a value “0”. This value is what defines the action to be performed, so we must change it to reflect what we want the button to do.

The available values are as follows:

  • 0: Do nothing
  • 1: sleep
  • 2: Hibernate (not supported on all systems)
  • 3: turn off
  • 4: turn off the screen

Finally, we write the following command to apply the changes made and press “Enter”.

powercfg -SetActive SCHEME_CURRENT

CMD confirmar nueva acción para el botón de inicio y apagado

Modify the behavior of the button from the Policy Editor

Another option that we have available in Windows 10 to change the behavior of the on and off button is to use the Group Policy Editor. This option will only be available if we use a Pro or Enterprise version of the Microsoft operating system.

To do this, the first thing we are going to do is use the keyboard shortcut “Windows + R” to launch the Run command. Here we write gpedit.msc and press Enter.

Once the Editor appears, we go to the section of “Equipment Configuration” and “Administrative Templates”. Here we click on “All values”. Next, we move to the bottom of the list where we will find the options “Select the action of the on / off button (with battery)” and “Select the action of the on / off button (connected)”, in the in case we use a laptop and only the second option in case of using a desktop PC.

Buscar Seleccionar la acción del botón de inicio y apagado

Now we must double click on each option and a new window will appear. Here we must mark the option as Enabled. This will enable a drop-down tab at the bottom, where we can choose between the options of:

  • No action required.
  • Lay off.
  • Hibernate.
  • To turn off.

Seleccionar la acción del botón de inicio y apagado con batería

We choose the desired option and click on Apply and OK to save the changes. Every time we want to make a modification, we just have to do the previous steps again.