The other evening I turned off my Windows XP system and busied myself with other matters, only to find the machine churning away several minutes later as it worked through its shutdown process. I could've understood the delay if it were installing updates, or even if some program or service had hung the system. But this was a typical PC shutdown, and it was taking forever. "There's gotta be a better way," I thought, and after doing a little research, I found a bunch of Registry tweaks that reset Windows to close shop like it's late for the bus ride home. Keep in mind, any changes to the Registry can be troublesome, so you may want to make these alterations one or two at a time just to make sure they don't futz up the works (it'll also be easier to diagnose any problems that may arise). And for sure back up the Registry by creating a restore point before you begin.
Kill your apps Some programs just don't know how to say goodbye. To speed up force-closing them at shutdown
WaitToKillAppTimeout in the right pane, and change the value data (measured in milliseconds) to 1000 - if you're in a real hurry--or something larger, if you want to give your recalcitrant apps a little more time to call it quits.
Click OK when you're done. Use this Registry key to reduce the number of milliseconds you want Windows to wait before killing apps at shutdown.
To reduce the wait before forcing hung applications to close, double-click HungAppTimeout in the right pane of the same key, and change the value data to 2000, or however many milliseconds you want to give the apps to unhang on their own. Of course, a better approach is to figure out why the app is hanging in the first place; I'll cover diagnosing hung applications in a future post: Stay tuned!
You may also want to change the value data of WaitToKillAppTimeout and HungAppTimeout in HKEY_USERS/.DEFAULT/Control Panel/Desktop key to apply the changes to all users on the system.
Clip your running tasks and services There's another Registry key that automatically ends running tasks at shutdown. Navigate to HKEY_CURRENT_USER/Control Panel/Desktop, double-click AutoEndTasks in the right pane, and change the value data to 1.
Now to whack your slow-ending services, go to HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control, double-click WaitToKillServiceTimeout in the right pane, change the value to 1000, and click OK.
Some people will tell you that you can speed up shutdowns by telling Windows not to clear the pagefile when it closes. Unfortunately, this could compromise your system security because sensitive data may be stored in the file unencrypted. There's even some question about whether disabling this setting will save you any time at shutdown. For me, the possibility of saving a couple of seconds on shutdown isn't worth the risk. That's why I recommend that you leave the ClearPageFileAtShutdown value at HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/SessionManager/Memory Management at 1. Some Vista systems (including mine) don't have all the Registry key entries described above. To add a missing entry, right-click in the right pane of its key, choose New > String Value, type the name, such as AutoEndTasks, double-click the new entry, add its value data (1 in the case of AutoEndTasks), and click OK.