In the left pane, navigate to HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Control.
One of the options that should pop up in the right pane once you’re there is called WaitToKillServiceTimeout. You’ll want to change a value in this Registry entry, so right-click on it and choose Modify.
You'll get an Edit String box:
Please see Backing up your registry first !
The default value you see may vary; on a Windows 7 desktop and laptop we tried this with, we saw a value of 12,000 (that’s in milliseconds); on a Vista laptop, we saw 20,000. We suggest changing it to 10,000, for starters. We definitely wouldn’t get too aggressive (i.e., don’t try “0” if you value stability), but work your way down slowly.
And that’s it! Next time you restart and then shut down, you should see the faster result.