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:
powercfg.cpl,1
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:
Power button action – Changes the hardware power button action
Start menu power button – Changes the power button on the Start Menu
You can change the power button to either Sleep, Hibernate or Shut Down, or even nothing for the hardware power button.
I do not believe it is possible. As Moab pointed out in the comments, it used to be possible in Windows 9x.
That used to work by unloading Windows, going to the DOS environment, and reloading Windows again (if I recall correctly, one could simply type in exit
at the command prompt to get Windows to reload).
Disclosure: I wrote ShutOff 2000, so I've been fiddling around with ways to shut down Windows since 1999. I don't claim to know all there is about it, though.
Best Answer
When you execute a shutdown, Windows initiates a shutdown sequence. It sends an END message to all running processes. Each process then starts it's own END sequence. Windows waits for a response from each process that says that the process has successfully ENDED or if it requires more time. IF the process requires more time, it sends a DELAY message to Windows. At this point, Windows resets the shutdown timer and waits for each process to END. If processes have not ENDED in the allocated default shutdown time, then Windows displays a dialog telling you that some programs are still running and asks you what to do. It is the responsibility of the programmer of that application, and not Windows, to make sure that the application/program/process ENDS quickly and cleanly. It is not Window's job to make sure that the shutdown is clean. Windows will handle it's own processes, but not those created by others.