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

  1. Press Windows Key + R to open the Run dialog box.
  2. Type regedit and press Enter (or click OK).
  3. 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

  1. Select the Desktop folder in the left pane.
  2. Look for a string value named AutoEndTasks in the right pane.
  3. If AutoEndTasks already exists:
    • Double-click it.
    • Change the Value data to 1.
    • Click OK.
  4. If AutoEndTasks does not exist:
    • Right-click any empty space in the right pane.
    • Hover over New and select String Value.
    • Name the new value AutoEndTasks and press Enter.
    • Double-click AutoEndTasks, set its Value data to 1, 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:

  1. In the same Desktop key, 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 1000 or 2000 (in milliseconds; default is 5000).
  2. 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.