Adjust Unresponsive App Shutdown Timeout in Regedit
When shutting down Windows, the operating system pauses to give running programs and background services time to save data and close gracefully. If an application hangs or becomes unresponsive, Windows waits for a predefined timeout period before forcefully terminating the process. By adjusting the relevant timeout keys in the Windows Registry Editor (Regedit), you can significantly decrease shutdown delays or extend the waiting period to prevent potential data loss.
Step 1: Open the Registry Editor
- Press
Windows Key + Rto open the Run dialog box. - Type
regeditand pressEnteror click OK. - If prompted by User Account Control (UAC), click Yes to grant administrative permissions.
Step 2: Adjust the Application Timeout
To modify how long Windows waits for unresponsive user applications:
In the Registry Editor, navigate to the following path:
HKEY_CURRENT_USER\Control Panel\DesktopIn the right pane, look for the String Value named
WaitToKillAppTimeout.- Note: If this value does not exist, right-click an empty space
in the right pane, select New > String Value, and
name it
WaitToKillAppTimeout.
- Note: If this value does not exist, right-click an empty space
in the right pane, select New > String Value, and
name it
Double-click
WaitToKillAppTimeout.In the Value data field, enter the desired time in milliseconds:
- Default:
20000(20 seconds) or5000(5 seconds) depending on the Windows build. - Recommended Fast Value:
2000(2 seconds).
- Default:
Click OK.
(Optional) Look for or create another String Value named
HungAppTimeout in the same folder. This
value determines how long Windows waits before considering an
application unresponsive. Set its value data to 1000 or
2000 (1–2 seconds) to reduce hung application detection
delays.
Step 3: Adjust the Background Service Timeout
To change the shutdown timeout for system-wide background services:
Navigate to the following path in the left pane:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ControlIn the right pane, locate the String Value named
WaitToKillServiceTimeout.Double-click
WaitToKillServiceTimeout.In the Value data field, enter the timeout duration in milliseconds:
- Default:
5000(5 seconds). - Recommended Value:
2000(2 seconds).
- Default:
Click OK.
Step 4: Automatically Terminate Hung Apps (Optional)
If you prefer Windows to automatically kill hung programs during shutdown without displaying a confirmation prompt:
Return to:
HKEY_CURRENT_USER\Control Panel\DesktopLocate or create a String Value named
AutoEndTasks.Double-click it and set the Value data to
1.Click OK.
Step 5: Apply the Changes
Close the Registry Editor and restart your computer to apply the new timeout settings. Windows will now use the specified time thresholds during subsequent shutdowns and restarts.