When you shut down or restart Windows 10 computer while some apps still running, you might see a message that gives you two options: close the programs first or shutdown/restart anyway.
Sometimes this message can be annoying, preventing the computer from shutting down although you have finished your works. Fortunately, you can automatically always shutdown anyway without having to trigger the button.
Here’s how to enable that setting.
1. Press the Windows+R button. Type regedit, then Enter. You may have to click Yes on a confirmation window.
2. Go to HKEY_USERS.DEFAULT\Control Panel\Desktop
3. Click Edit > New > String Value.
4. Give it the name AutoEndTasks.
5. Double-click on it, set Value data to 1 and click OK.
6. Now, restart your computer to save the effect.
You can restart the computer later if you still have work to be done. Shutting down would also give the same effect. If you changed your mind, you can remove AutoEndTasks by right-clicking on it, and choose Delete.
Additional Tip: Manage Shutdown Prompts More Efficiently
Want a quicker way to handle shutdown prompts?
If you frequently encounter the “A program is preventing shutdown” message, consider using the shutdown command with parameters to bypass interruptions. This method forces applications to close and shuts down your system immediately.
Steps to Use the Shutdown Command:
- Press
Win + R
to open the Run dialog box. - Type
cmd
and press Enter to open Command Prompt. - Use the following command:
shutdown /s /f /t 0
/s
: Initiates a shutdown./f
: Forces all running applications to close without saving./t 0
: Sets the timer to zero for immediate action.
This approach is ideal for advanced users who need a quick, no-prompt shutdown.
Pro Tip: Save this command as a shortcut on your desktop for one-click access. Simply right-click on your desktop, select “New > Shortcut,” and paste the command. Name it something like “Quick Shutdown” for easy identification.
For more automation, you can explore Task Scheduler to set up recurring shutdowns or integrate this command into scripts for seamless operations.
Looking for more control over your system? Explore Microsoft’s documentation on advanced shutdown options!
I am looking for the opposite “How to NEVER EVER Restart Anyway on Windows 10”
I have users that always click on that and then blame me when they lose their stuff.
So, you mean that you want to prevent users from clicking “Restart Anyway” before they save their work?
I guess it would be a little trickier but I’ll update the article as soon as I found the solution.
I am afraid this did not work. I just tried this on Windows 10. The goal was to allow windows shut down regardless from UPS, in case there is a power outage, in which corrupting the disk is a worse scenario that losing a word document hanging. I made the changes in the registry as recommended and restarted twice. I then created a word document, and I left it unsaved. I then selected “shutdown” in the menu, and I was still asked to confirm.