Change Windows Service Shutdown Timeout in Registry

During a Windows shutdown or restart, the operating system gives running services a specific amount of time to close cleanly before forcefully terminating them. This article explains the exact Windows Registry setting responsible for controlling this timeout duration, known as WaitToKillServiceTimeout, and provides straightforward instructions on how to locate and modify its value to resolve slow shutdown issues.

The Registry Value: WaitToKillServiceTimeout

The default timeout period for terminating unresponsive services during a Windows shutdown is controlled by the WaitToKillServiceTimeout string value.

In older Windows versions (such as Windows 7), this value was set by default to 12000 (12 seconds) or 20000 (20 seconds).


How to Modify WaitToKillServiceTimeout

To change how long Windows waits before killing unresponsive background services, follow these steps:

  1. Press Win + R to open the Run dialog box.

  2. Type regedit and press Enter to launch the Registry Editor.

  3. In the address bar at the top, paste the following path and press Enter:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
  4. In the right-hand pane, locate and double-click the WaitToKillServiceTimeout entry.

  5. In the Value data field, enter your desired timeout in milliseconds (for example, 2000 for 2 seconds, or 5000 for 5 seconds).

  6. Click OK to save the changes.

  7. Restart your computer for the new configuration to take effect.


Considerations When Adjusting the Timeout