This is a message I wrote in relation to another post, another time, another forum, another life... for what it's worth, it may have some relevance to your problem:
Windows may time-out while waiting for system services to shut down. When this happens, Windows tries to force any services still running to shut down immediately. Forcibly closing a service before it has time to shut down by itself can cause a number of problems, including system lockup and file corruption, which means that not only does your computer hang on shutdown, but the next time you boot, Windows may keep you waiting while it runs a disc check.
The solution is to configure Windows to wait a bit longer so services have more time to close of their own accord. Open the Registry Editor and navigate to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control.
Check whether there is an existing key called WaitToKillServiceTimeout. If there is, double-click on it to open the editing window, then go straight to Step 6 below.
If the key doesn't exist:
1. Click EDIT > NEW > STRING VALUE in the menu bar. This will create a new key named New Key #1, of data type REG_SZ.
2. Highlight New Key #1 and click EDIT > RENAME.
3. Rename the key WaitToKillServiceTimeout (this name is case sensitive).
4. You'll notice that the new key is labelled with a folder icon. Within the folder you will see a single entry with the name (Default).
5. Highlight (Default) and click EDIT > MODIFY. The Edit String window will open, with the Value Name greyed out so you can't change it.
6. In the Value Data line, enter a value specifying the number of milliseconds to wait for a service to close before timing out. The default value varies according the Windows version. Whatever it is now, multiply it by 3 (or more, or less, according to taste). So if the figure is 20000 (Windows XP), change it to 60000 (ie 60 seconds).
7. Click OK, close the Registry Editor, and reboot to make the change take effect.