Windows – Make Windows 7 shutdown/restart more graceful

rebootshutdownwindows 7

After a few days it inevitably comes round that I need to restart my machine. (Gut feeling that things would be better after a reboot or just plain old Windows update).

There's a screen that pops up showing running foreground task and sometime it marks the top one as "Preventing windows shutting down", so I have to quit the shut down and review the save dialog, shutdown again…several times and eventually it will just get on with it.

Sounds great but in practice its really annoying to have a foreground app lock out the system and demand you fix 1 thing…

But why doesn't it carry on closing Apps that can respond to shutdown request gracefully?

Are there any options for tuning this sequence?

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.