This tutorial will show you how to set the amount of time Windows 7 waits for programs to save data and close before shutting down. Always, as usual, make sure you save and close applications before shutting down to prevent data loss. I also recommend that you backup the registry before editing it.
Open the Start Menu >> In Search box, type regedit >> Enter.
In regedit, navigate to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
On right pane, right select WaitToKillServiceTimeout >> click Modify.
Type in a number between 2000-20000 (2-20 seconds) and click OK.
Close regedit