If you want to change the time interval that Windows waits before closing applications during shutdown or restart, you must change the value of HungAppTimeout. Although the default value is set to 5 seconds, you can increase or decrease this delay as needed. All you need to do is edit the value data of HungAppTimeout in the Registry Editor.
Suppose that one or two applications (for example SnagIt, Chrome, Outlook, etc.) are open and that you click on the Restart or Stop button. In such a case, Windows may display a message that these applications are open and preventing your system from shutting down. While it is possible to disable this app prevents the shutdown message in Windows 10, you can also change the timeout for closing these apps manually. By default, it displays a Stop anyway button that allows users to shut down your computer without closing these applications.
Change how long Windows waits before closing applications that are stopped
To change the timeout period for Windows 10 before closing apps when stopped or restarting, follow these steps:
- Press Win + R to open the Run prompt.
- Type regedit and press the Enter button.
- Click Yes at the UAC prompt.
- Go to the Desktop folder in HKEY_CURRENT_USER.
- Double-click on HungAppTimeout.
- Set a value in milliseconds.
- Click OK and close the Registry Editor.
Since you are going to change the values in the Registry Editor, it is best to back up the registry files or create a system restore point.
Press the Win + R buttons simultaneously to open the Run prompt. Here you have to type regedit and hit the Enter button. You should see the UAC prompt. If yes, click on Yes to open the Registry Editor on your computer.
After opening the Registry Editor, navigate to the following path:
All the users:
Here you will find a DWORD value called HungAppTimeout. If you cannot see this DOWRD value in the Office key, you have to create it manually.
To do this, right click on Office, select New> DWORD value (32 bit) and name it as HungAppTimeout. Then double-click this DWORD value.
By default, it is set to 5000 (5 seconds). You must enter a value according to your needs. If you want it to be 7 seconds, enter 7000. If you are going to do 3 seconds, enter 3000 and so on.
Finally, click on the Okay to save the change and close the Registry Editor.
From now on, Windows 10 will wait for the recently changed time before killing the application.
Related reading: Prevent Windows 10 from automatically reopening apps or programs after a restart.