Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm not sure if this is a programming question exactly, but it does affect my work quite a bit. I have a project I'm working on where a program has to perform certain tasks on startup. The project itself is no problem, but testing it is. Windows XP and Vista is taking a long time to shutdown.

When Windows tries to shut down the hard drive sometimes seems to thrash constantly. It can take from 1 to 3 minutes with the windows screen sitting there saying "Shutting down please wait." There is no indication of what is happening and I can't seem to monitor the process because any programs I try to leave running get terminated. Restarts seem to go bit faster.

I've disabled automatic windows updates so that's the problem. I've also ran anti-virus and anti-spyware programs and the system appears to be clean. I generally have a few browser windows open, putty, python and visual studio.

  1. Why does Windows XP/Vista take so long to shutdown sometimes but not all the time?
  2. What exactly happens during the shutdown process?
  3. Is there anything I can do to speed up the shutdown process?

Thank you

share|improve this question

migrated from stackoverflow.com Aug 17 '09 at 21:00

This question came from our site for professional and enthusiast programmers.

    
I'm struggling to see the programming angle here... –  skaffman Aug 17 '09 at 20:51
    
Should go on SuperUser probably. –  EBGreen Aug 17 '09 at 20:58
    
Re #3, Ivo had a trick in the Windows tweaks thread superuser.com/questions/3864/…. –  hyperslug Aug 17 '09 at 21:09
    
You can make Windows shutdown faster by changing how long it waits for services and applications to be killed with a few registry tweaks as described in this article. –  martineau Aug 6 '12 at 19:00
add comment

4 Answers

Windows services takes the most of shutdown time. Some services, like those that have network-related shutdown operations or have to save large amounts of data to disk, might require more time and so Windows Vista allows a service to request pre-shutdown notification. When Windows Vista shuts down, the Service Control Manager first notifies those services asking for pre-shutdown notification. It will wait indefinitely for these services to exit, but if they have a bug and don't respond to queries, the Service Control Manager gives up and moves on after three minutes.

share|improve this answer
add comment

I'm not sure if you're already doing this, but exiting all programs manually (including any in the systray) before shutting down speeds up the process for me.

share|improve this answer
add comment

Windows also saves settings on shutdown. The longer you keep your computer on you will notice it takes longer to shut down.

share|improve this answer
add comment

Leaving certain programs open can slow shutdown, too. For example, it can take upwards of a minute to shut down if I leave uTorrent (for linux distros, of course) open, but closer to 15 seconds otherwise. It's no exact amounts, but closing off apps that constantly download/upload/disk I/O could help.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.