How to automatically complete tasks when you turn off Windows
When you try to shut down, restart, or exit Windows, you may notice that Windows notifies you that the application does not allow Windows to shut down or restart. To turn off the system, you must click the “Turn off all the same” button. If you do not press a button for a set period of time, Windows will cancel the shutdown action. As a rule, when you turn off or restart the system, it tries to close all applications automatically. However, when an application does something in the background or if there is any unsaved work, it may block Windows from closing. This is good for the most part, because it gives you the opportunity to save your work and close the application correctly. But if there is any application that uses this function incorrectly, or if you think you do not want applications to block the shutdown or reboot process, you can force Windows to close all applications regardless of their state during the shutdown, restart or shutdown process .
Enable automatic completion of tasks for the current user.
If you want applications to prevent the current user from shutting down or restarting the system, follow these steps: Please note that the changes you make will not be affected by other users of your system. For example, if necessary, applications may block other users from shutting down or restarting the system. I recommend to create a restore point, as we will use the registry editor.
1. Open the start menu and type in the search regedit, then run it.
2. In the registry, move to the next location. If you are using Windows 10, you can copy and paste the path into the address bar of the editor and press Enter.
HKEY_CURRENT_USER \ Control Panel \ Desktop
3. When you will be in Desktop folder, right click on the right mouse button and select New> String value.
4. AutoEndTasks, then double-click on the two mouse clicks and press the 1.
Restart the system so that the changes are completed. After you restart Windows, you will no longer need to block applications to block the process, reset, or exit from the system. If you are not sure how to get back to AutoEndTasks or something like this to 0.