The shutdown problems could also be due to hung applications or device drivers.
See if these tweaks will help:
How to improve on shutdown time ? Close apps automatically & quickly at shutdown
Open Registry by going to START-RUN and typing REGEDIT. Navigate to HKEY_CURRENT_USER\CONTROL PANEL\DESKTOP and look for AutoEndTasks. On my computer default value is 0. Change it to 1. Thats all.
Further more you can reduce the time it takes for Windows to issue kill directive to all active/hung applications. In doing this only constraint that you should make sure exists is that HungAppTimeout is greater than WaitToKillAppTimeout. Change the values of WaitToKillAppTimeout to say 3500 (since default value for HungAppTimeout 5000 and for WaitToKillAppTimeout is 20000).
Reduce Shutdown XP.
Start | Run type: gpedit.msc | OK
This opens the Group Policy editor.
Go to Computer Configuration/Administrative Templates/System/User Profiles and find the policy: "Maximum retries to unload and update user profile."
Double-click it and select Enabled.
Change the Max retries value to "0".
I figured, "If you can't unload it, don't bother trying", so I set mine to 0 and shutdown is (finally!) instantaneous once again."
Also look for updates for your video & sound drivers.