Make Windows 7 shutdown/restart more graceful

5,047

Solution 1

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.

Solution 2

I'm not sure I understand the question correctly, but if it's "Why doesn't Windows just shut down all applications gracefully?", the answer is "because Windows doesn't know how to interact with every application ever created"... it's the application's responsibility to respond gracefully, and if it doesn't, Windows would rather wait for you to do something than just kill the application and risk losing your work.

Solution 3

The opening question is pretty straightforward and boils down to why does Windows interfere with the user input during the shutdown process? It means you cannot manually resolve the reasonable shutdown questions offered by apps like you could do in XP for example, or any Linux version. You must abort each shutdown, answer the one open question, then try again, at which point you get the next one.

Unfortunately Windows 7 is littered with cases of new 'features' that actually detract from usability and productivity. Moving folders in Explorer when opening is my pet peeve, this one on shutdown follows a close second, having to go through the Network and Sharing Center for Dummies to interact with the network devices and with the visually pleasant but interfering graphic overload of Aero, are just a few examples.

FWIW I just tested the shutdown and it does block at the first application delaying the shutdown - opened Notepad and Wordpad, started editing a doc in each but didn't save, had a browser, couple of other apps open, then start shutdown. The shutdown modal UI comes up and when it has a program at the top of the list which is blocking the shutdown, it stops at that app. Any other apps remain below it in the list and do not attempt to shutdown or even get flagged as going to block the shutdown. So abort shutdown, closed Notepad, then shutdown again - now it is Wordpad blocking. Abort shutdown, close Wordpad, restart shutdown - now it is Outlook blocking. Yawn.

Not a good addition IMO and I haven't found a way to turn it off.

Share:
5,047

Related videos on Youtube

Mesh
Author by

Mesh

Updated on September 18, 2022

Comments

  • Mesh
    Mesh almost 2 years

    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?

  • Mesh
    Mesh about 13 years
    But it doesent feel like ALL applications get the shutdown message - it feels like each is sent a shutdown message in order, and if one delays then no other apps shutdown, even though they have no changes to save...
  • Jackson
    Jackson about 13 years
    I have not seen this in my Win7 systems. I have seen numerous times that other apps continue to shut down even though one app is holding things up.
  • mjsr
    mjsr about 13 years
    It happen exactly what @Metril says. So Adrian if you don't wan't to manually close those application that need your interaction you could always press the "Force restart" button, but with the consequence of losing not saved work.
  • Mesh
    Mesh about 13 years
    I've just restarted again, the 'problem' seem to be that, W7 does shutdown the apps but only while the UI blocking dialog is up... so if you cancel and attend to the blocking app you then have to shutdown again...and again... I can kind of see what the designers were thinking, it just seems awkward in practise. Why block? why not have a floating window or notification window that shuts down apps iteratively?
  • MightyE
    MightyE about 13 years
    I don't get why the full screen UI covers up any program save dialogs. Most of the time if there's an unsaved document, it's something disposable like a copy of Notepad which I pasted some text into just to hold onto it temporarily (I'm pretty conscientious to save early&often). But I can never risk it, I always have to cancel and review - why would this be a full screen modal which prevents you from interacting with the programs in question?
  • Mesh
    Mesh about 13 years
    @MightyE Exactly! why throw the modal?
  • Mesh
    Mesh about 13 years
    You cant hibernate for windows update and other maintenance, which is usually when I want to restart. Mostly my PC sleeps!
  • Mesh
    Mesh about 13 years
    Actually, Windows does know how to shutdown applications. ALL windows applications have to take part in a Windows Message Handling and must define a WndProc Callback....If in 2011 you are using an app that doesn't know how to shutdown correctly.....