Let’s assume that one or two apps (eg SnagIt, Chrome, Outlook, etc.) are open, and you click on the Restart or Shutdown button. In such a case, Windows may display a message saying that those apps are open and are preventing your system from shutting down. Although it is possible to disable This app is preventing shutdown message in Windows 10, you can change the timeout for closing those apps manually as well. By default, it shows a Shut down anyway button that allows users to shut down your computer without closing those apps.
Change how long Windows waits before closing apps at Shutdown
To change the time Windows 10 waits before closing apps at shutdown or restart, follow these steps- Since you are going to change values in Registry Editor, it is better to backup Registry files or create a System Restore point. Press the Win+R buttons together to open the Run prompt. Here, you need to type regedit and hit the Enter button. You should see the UAC prompt. If so, click the Yes button to open Registry Editor on your computer. After opening Registry Editor, navigate to the following path- Current user: All users: Here you will find a DWORD value called HungAppTimeout. If you cannot see this DOWRD value in the Desktop key, you need to create it manually. For that, right-click on Desktop, select New > DWORD (32-bit) Value and name it as HungAppTimeout. Next, double-click on this DWORD value.
By default, it is set to 5000 (5 seconds). You need to enter a value as per your requirement. If you want to make it 7 seconds, enter 7000. If you’re going to make it 3 seconds, enter 3000 and so on. At last, click the OK button to save the change and close the Registry Editor. From now onward, Windows 10 will wait for the recently changed time before killing the app. Related read: Stop Windows 10 from automatically reopening apps or programs after a restart.