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

  1. Press Windows Key + R to open the Run dialog box.
  2. Type regedit and press Enter or click OK.
  3. 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:

  1. In the Registry Editor, navigate to the following path:

    HKEY_CURRENT_USER\Control Panel\Desktop
  2. In 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.
  3. Double-click WaitToKillAppTimeout.

  4. In the Value data field, enter the desired time in milliseconds:

    • Default: 20000 (20 seconds) or 5000 (5 seconds) depending on the Windows build.
    • Recommended Fast Value: 2000 (2 seconds).
  5. 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:

  1. Navigate to the following path in the left pane:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
  2. In the right pane, locate the String Value named WaitToKillServiceTimeout.

  3. Double-click WaitToKillServiceTimeout.

  4. In the Value data field, enter the timeout duration in milliseconds:

    • Default: 5000 (5 seconds).
    • Recommended Value: 2000 (2 seconds).
  5. 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:

  1. Return to:

    HKEY_CURRENT_USER\Control Panel\Desktop
  2. Locate or create a String Value named AutoEndTasks.

  3. Double-click it and set the Value data to 1.

  4. 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.