When you have open running programs, and you click on Shutdown or Restart you will see a screen with message Closing apps and shutting down/restarting, This app is preventing shutdown/restart. The exact message will read something like this-
Closing apps and shutting down/restarting
To go back and save your work, click Cancel and finish what you need to.
This app is preventing shutdown.
The options are Shut down anyway and Cancel.
Here’s how you can disable this shutdown message and make your Windows computer shut down right away without displaying this message.
This app is preventing shutdown
This screen appears only at a particular time. Let’s assume that you were working on Paint app and you opened an image with Paint. Now your system wants you to save the image if you have made any change. In case, you didn’t save the image and tried to shut down the PC without even closing the Paint; this warning message would appear.
This same thing can happen with any other app whenever you needed to save something, but you didn’t. It can happen with Notepad, Photoshop, or any other program.
This warning screen appears because your system asks you to save the change you made in your file and you haven’t closed the opened app. Windows doesn’t close all open apps automatically, by default.
You can skip this warning message using Registry Editor. As mentioned earlier, you need to create a key in the Registry Editor. However, before getting started, you should create a backup of Registry files or create a system restore point.
After that, open Registry Editor. For that, press Win + R, type regedit and hit the Enter button.
Now navigate to this path:
After selecting Desktop, right-click on the right-hand side > New > String Value.
Create a string value and name it as AutoEndTasks. Now double-click on this and set the value to 1.
This string value will close all the opened apps automatically when you try to shutdown or restart your system, and you will not see any shutdown message.
You could also:
Navigate to HKEY_LOCAL_MACHINE / SYSTEM / CurrentControlSet / Control. Click on the “Control” Folder. Select “WaitToKillServiceTimeout” Right click on it and select Modify. The default value is 20000. Setting it to a lower 4 digit value, (say 5000) will make your PC shutdown faster, but you could end up losing data, so use this tweak judiciously. Remember, Windows does not in any case, recognise a 3-digit numeral here.
Hope this helps!
TIP: You can also stop Windows 10 from opening programs after restart.