How-To Geek
Make Your Windows 7 PC Not Shutdown when You Accidentally Hit the Power Button
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.

From the dropdown list you can also select Shutdown, Sleep or Hibernate. But, if you are annoyed when you accidently hit the button and it shuts down, choosing Do Nothing will keep it running.
Got Feedback? Join the discussion at discuss.howtogeek.com
Comments (5)
Programmer by day, geek by night, The Geek, also known as Lowell Heddings, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on Google+ if you'd like.
- Published 01/8/10




Thankyou very much my 1 and a 1/2 year old Great GranDaughter loves to sneak up on me and hit the button on my tower and befor i know whats going on the computer shuts off :p i have allready set my computer to do nothing :) thanx to you
Happy New Year
I had mine set to sleep. I like it that way- when people are around that like to mess with my files and I need to get something really quick, I just hit power.
What if im using windows xp? i cant find power options to my control panel! plz tell me how to do it at windows xp thx.
@questioner
In Windows XP go to Control Panel >> Performance & Maintenance >> Power Options.
Now you will have a dialog box open-up where you will find many such options!
hi!
i am using windows 7 starter and i have selected a power saving power plan which puts my netbook to sleep whenever i close the lid or press the power button. however, i like it to turn the display off when i close the lid and shut down when i press the power button.
so i assigned the power button to shut down on “choose what the power button does” page but it didn’t work. the power saving option of sleep still overrides my universal option.
isnt the “choose what the power button does” page supposed to apply on all power plans and override them?
then i tried to modify the advanced power option in my power plan and i wasnt allowed to change the sleep option. the dropdown menu for close the lid & power button only contains sleep. why?