On Windows XP I had it set so that when I pressed the power button it would ask me if I wanted to shut down, restart, stand by or log out. This does not appear to be an option in Windows 7. Is there any way I can enable this function?
The default action for the Power button on the start menu in Windows 7 is shutdown, and in Vista is Sleep, which isn’t necessarily useful for everybody, so we’ll explain how to change it here.
Change Windows 7 Shutdown Button
Windows 7 makes it really easy – just head into the Start Menu / Taskbar preferences by right-clicking on the start menu and choosing Properties.
All you need to do is change the drop-down for Power Button Action to whatever you would prefer.
Change Windows Vista Power Buttons You can configure this setting easily by using the advanced power settings panel, which is a little tricky to get to normally, but we’ll take the shortcut.
Open a command prompt (type cmd into the start menu search bar), and then type in the following:
You could also take the long route (Control Panel \ Power Options \ Change Plan Settings \ Change Advanced Power Settings)
Once you get to this dialog, browse down to “Power buttons and lid”
From here, you can change the options:
You can change the power button to either Sleep, Hibernate or Shut Down, or even nothing for the hardware power button.