Friday, March 28, 2008

Tweaks to help speed up Shutdown Issues

If you would like Windows to close shop like it's late for the bus ride home try some of the following tweaks:

Some programs just don't know how to say goodbye. To speed up force-closing them at shutdown, open the Registry Editor and navigate to HKCU/Control Panel/desktop (or Desktop). Double-click WaitToKillAppTimeout in the right pane, and change the value data (measured in milliseconds) to 1000

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

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.

There's another Registry key that automatically ends running tasks at shutdown. Navigate to HKCU/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 HKLM/SYSTEM/CurrentControlSet/Control, double-click WaitToKillServiceTimeout in the right pane, change the value to 1000.

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 HKLM/SYSTEM/CurrentControlSet/Control/SessionManager/Memory Management at 1.

Some Vista systems 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

There is also a tool from Microsoft called the User Profile Hive Cleanup service helps to ensure user sessions are completely terminated when a user logs off. You can get it by clicking here.