To change the default action when your computer is on battery, use the following command: To change the default action when your computer is plugged in, use the following command: Type the following command to change the default action for the power button and press Enter: Search for Command Prompt, right-click the result, and select Run as administrator.If you prefer using command lines, it's also possible to use Command Prompt to define a new action for the power button.
How to change power button action using Command Prompt In addition, on laptops and other mobile devices like Surface Pro, you can define the power button action when it's plugged in and when it's running on battery. For example, the hibernation power state is not a feature supported on every system, which means that depending on the hardware this option may not be available. Once you completed the steps, every time you press the power button your computer will respond to the new action.ĭepending on the hardware and device you own the settings available will be different. Using the drop-down menu for "When I press the power button" select the action you want:Ĭlick the Save changes button at the bottom of the window.
How to change power button action using Control Panel
How to change power button action using Command Prompt.How to change power button action using Control Panel.