Make Your Windows 7 PC Not Shutdown when You Accidentally Hit the Power Button
From the dropdown list you can also select Shutdown, Sleep or Hibernate. But, if you are annoyed when you accidentally hit the button and it shuts down, choosing Do Nothing will keep it running.
Is your computer in an odd place where you sometimes find yourself accidentally hitting the power button and it shuts down in the middle of using it? Here we take a look at how to remedy the problem by instructing the power button what to do when it’s pressed.
Open Control Panel and select Power Options, then on the left side click on Choose what the power button does.
Then click on the dropdown box and select Do Nothing from the menu and click on Save changes.