When you shut down your computer, Windows doesn’t shut down immediately. Instead, it gives running applications and services some time to close first. You can control how long Windows waits—and whether it automatically closes running applications or not.
You shouldn’t normally need to change these settings, but it can be helpful if you’d like to force your computer to shut down more quickly. Some applications may also mess with these settings when you install them, and you might want to reset them to the default values if your shutdown process seems slow.
Change the Wait Time for Desktop Applications
There are three registry settings that control what Windows does with running applications when you shut down your computer:
WaitToKillAppTimeout: When you shut down your PC, Windows gives open applications 20 seconds to clean up and save their data before offering to close them. This value controls how many seconds Windows waits for. HungAppTimeout: Windows considers applications “hung” if they don’t respond within 5 seconds and gives you a “force shut down” option. This value controls how many seconds Windows waits before considering applications unresponsive. AutoEndTasks: Windows normally displays an “force shut down” button after the number of seconds expires, asking for your permission to close any running applications. If you enable this option, Windows will instead automatically close any applications and shut down without your input.
RELATED: Learning to Use the Registry Editor Like a Pro
Standard warning: Registry Editor is a powerful tool and misusing it can render your system unstable or even inoperable. This is a pretty simple hack and as long as you stick to the instructions, you shouldn’t have any problems. That said, if you’ve never worked with it before, consider reading about how to use the Registry Editor before you get started. And definitely back up the Registry (and your computer!) before making changes.
To change these settings, you’ll need to use the Registry Editor. To open it, press Windows+R on your keyboard, type “regedit”, and press Enter.
Navigate to the following key in the left pane of the registry editor window:
Check to see if you have any of the “WaitToKillAppTimeout”, “HungAppTimeout”, or “AutoEndTasks” settings in the right pane. If you don’t see them, Windows is using the default settings.
To create one of these settings, right-click the “Desktop” key in the left pane and select New > String Value. Name it “WaitToKillAppTimeout”, “HungAppTimeout”, or “AutoEndTasks”—whichever setting you want to customize. Repeat this process to add a second one or even all three.
To configure the WaitToKillAppTimeout value, create the string value and double-click it. Enter a value in milliseconds. For example, the default value is “20000”, which is 20000 milliseconds or 20 seconds. If you wanted to set it to 5 seconds, you’d enter “5000”.
We don’t recommend setting this value too low, as applications do need time to clean up. As a rule of thumb, don’t set it below 2000, or 2 seconds.
To configure the HungAppTimeout value, create the string and double-click it. Enter a value in milliseconds. For example, the default value is “5000”, which is 5000 milliseconds or 5 seconds. If you wanted to set it to 3 seconds, you’d enter “3000”.
We don’t recommend setting this value too low, or Windows will think applications are unresponsive when they aren’t. As a rule of thumb, don’t set it below 1000, or 1 second.
To configure the AutoEndTasks value, create the string and double-click it. Set it to “1” if you want Windows to automatically close programs at shutdown. The default value is “0”, which means Windows won’t automatically close programs at shutdown.
Be careful to save your work in any running programs before you shut down if you tell Windows to automatically close open programs. You could lose any open work when Windows abruptly forces programs to close at shutdown.
To undo a change, locate the WaitToKillAppTimeout , HungAppTimeout , or AutoEndTasks values in the right pane. Right-click the option and select “Delete” to remove it. Windows will use the default setting instead.
Background Services
Windows only offers one registry setting that controls what Windows does with background system services when you shut down your computer:
WaitToKillServiceTimeout: Windows normally waits 5 seconds for background services to clean up and close when you tell your computer to shut down. Some applications may change this value when you install them, giving their background services extra time to clean up. Windows forcibly shuts down background services after this period of time. This value controls how many seconds Windows waits before doing so. Windows will automatically shut down if all services close successfully before the timer expires.
To change this setting, you’ll need to use the Registry Editor. To open it, press Windows+R on your keyboard, type “regedit”, and press Enter.
Navigate to the following key in the left pane of the registry editor window:
Locate the WaitToKillServiceTimeout value in the right pane. If you don’t see it, right-click the “Control” key in the left pane, select New > String Value, and name it “WaitToKillServiceTimeout”.
Double-click the WaitToKillServiceTimeout value and enter a number of milliseconds. The default is 5000 milliseconds, or 5 seconds. To set it to 20 seconds, you’d enter “20000”.
You shouldn’t set a value too low or background services won’t be able to shut down properly. As a rule of thumb, don’t set this value below “2000”, or 2 seconds.
To undo this change, return here and double-click the WaitToKillServiceTimeout option. Set it to “5000”, the default setting.