Auto-End Tasks on Shutdown in Regedit
When shutting down or restarting Windows, open applications that fail
to close can trigger the “This app is preventing shutdown” screen,
delaying the process until you manually intervene. By modifying the
Windows Registry, you can enable the AutoEndTasks feature,
which automatically forces unresponsive or running applications to
terminate upon shutdown without waiting for manual confirmation. This
guide provides step-by-step instructions to configure this setting
safely using the Registry Editor.
Step 1: Open the Registry Editor
- Press
Windows Key + Rto open the Run dialog box. - Type
regeditand press Enter (or click OK). - If prompted by User Account Control (UAC), click Yes to allow administrative access.
Step 2: Navigate to the Desktop Registry Key
To apply the setting to your current user profile: 1. In the left
navigation pane, go to the following path:
HKEY_CURRENT_USER\Control Panel\Desktop
(Optional) If you want to apply this setting for all users
on the computer, navigate to:
HKEY_USERS\.DEFAULT\Control Panel\Desktop
Step 3: Configure the AutoEndTasks Value
- Select the Desktop folder in the left pane.
- Look for a string value named
AutoEndTasksin the right pane. - If
AutoEndTasksalready exists:- Double-click it.
- Change the Value data to
1. - Click OK.
- If
AutoEndTasksdoes not exist:- Right-click any empty space in the right pane.
- Hover over New and select String Value.
- Name the new value
AutoEndTasksand press Enter. - Double-click
AutoEndTasks, set its Value data to1, and click OK.
(Note: Setting the value to 1 enables the automatic
termination of tasks. Setting the value to 0 or deleting
the key restores default Windows behavior.)
Step 4: Adjust Shutdown Timeout (Optional)
To speed up how quickly Windows closes running applications after triggering the auto-end task:
- In the same
Desktopkey, check for the following string values (create them as String Values if they do not exist):- WaitToKillAppTimeout: Determines how long Windows
waits before ending non-responsive programs. Double-click it and set the
value to
2000(value in milliseconds, representing 2 seconds; the default is 5000). - HungAppTimeout: Determines how long Windows waits
before considering an application unresponsive. Set its value to
1000or2000(in milliseconds; default is 5000).
- WaitToKillAppTimeout: Determines how long Windows
waits before ending non-responsive programs. Double-click it and set the
value to
- Click OK after modifying the values.
Step 5: Restart the Computer
Close the Registry Editor and restart your computer. The changes will take effect immediately on subsequent shutdowns and restarts.