How to Fix Task Host Window Prevents Shut Down on Windows?

The Task Host is a critical Windows system process responsible for ensuring that all running programs and background tasks are properly closed during shutdown to prevent data loss or program corruption. When the “Task Host Window” error appears during shutdown, it indicates that the system is waiting for certain tasks to complete, often causing a stalled shutdown process.

How to Fix Task Host Window Prevents Shut Down on Windows?
How to Fix Task Host Window Prevents Shut Down on Windows?

This issue typically occurs due to pending or stuck updates, particularly related to Windows Update, where tasks like syncing settings or applying updates fail to complete. Other potential causes include unresponsive applications or services running in the background.

In this article, we will discuss different ways to solve this error.

1. Close the Running Application and Perform a Shutdown

Leaving applications open during shutdown can stop Windows from closing tasks, causing the Task Host Window error. Manually closing all programs ensures no active processes delay the shutdown, allowing the system to power off smoothly.

  1. Open Task Manager by pressing Ctrl + Shift + Esc.
  2. Select Notepad or the application you are working on and click End Task.
    End Task Application
    End Task Applications
  3. Try shutting down your computer now.

2. Turn off Fast Startup

Fast Startup in Windows speeds up boot times by saving system data to a special file. However, it can cause issues by not allowing some background tasks to close properly during shutdown. Turning off Fast Startup allows for a complete shutdown, helping fix the “Task Host Window” error by ensuring all services and tasks close correctly.

  1. Click the Start Menu and type Control Panel.
    Open Control Panel
    Open Control Panel
  2. Open Control Panel and go to Hardware and Sound\Power Options.
  3. Click Choose What the Power Button Does on the left side.
    Click Choose What The Power Button Does
    Click Choose What the Power Button Does
  4. Select Change Settings That Are Currently Unavailable.
  5. Uncheck Turn on Fast Startup.
  6. Click Save Changes.
    Changing Power Options Settings
    Changing Power Options Settings
  7. Restart your computer to check if the issue persists.

3. Run Windows Update Troubleshooter

Using the Windows Update Troubleshooter helps fix one common cause of the Task Host Window error—stuck updates. This tool automatically finds and fixes problems with Windows Update, ensuring all tasks finish correctly and don’t block the shutdown.

Microsoft\Windows\WindowsUpdate\AutomaticAppUpdate
  1. Click the Start Menu and type Settings.
    Launch Settings
    Launch Settings
  2. Open Settings and go to Update & Security.
    Head to Windows Update Security
    Head to Windows Update Security
  3. Click Troubleshoot and then select Additional Troubleshooters.
    Click Additional Troubleshooters
    Click Additional Troubleshooters
  4. Select the Windows Update troubleshooter and click Run the Troubleshooter.
  5. When it’s finished, restart your computer and check if the issue is resolved.

4. Uninstall Windows Updates

Sometimes, new Windows updates can cause problems that lead to the Task Host Window error. Uninstalling these updates can fix the issues, allowing your computer to shut down normally again. This process returns your system to how it was before the update.

  1. To uninstall a Windows Update, open the Control Panel.
  2. Go to Programs and Features.
  3. Click View Installed Updates.View Installed Updates
  4. Select relevant updates, such as KB5012170 or KB5015730, if they are known to cause issues.
    Uninstalling Windows Update
    Uninstalling Windows Update
  5. After uninstalling the updates, type Check for Updates in the Start Menu.
  6. Open Settings and click Check for Updates.
    Checking for Windows Update
    Checking for Windows Update
  7. Download the updates, reinstall them, and restart your computer. Then, verify if the error has been corrected.

5. Clear the Software Distribution Folder

Clearing the Software Distribution folder resets the place where Windows keeps update files temporarily. If these files are damaged or incomplete, they can stop updates from finishing during shutdown. Deleting them lets Windows download new files, which often fixes the issue.

  1. Follow these steps to clear the Software Distribution folder:
  2. Click the Start Menu and type Command Prompt.
  3. Choose Run as Administrator.
    Run CMD As Administrator
    Run CMD As Administrator
  4. Enter the command to stop the Windows Update service:
    net stop wuauserv
  5. Press Windows + R to open the Run dialog box.
  6. Type the following directory and click OK:
    C:\Windows\SoftwareDistribution
    Opening Software Distribution Folder
    Opening Software Distribution Folder
  7. Select all files in the folder, right-click, and click Delete.
    Delete Software Distribution Files
    Delete Software Distribution Files
  8. Restart the Windows Update service with this command:
    net start wuauserv
  9. Run Windows Update to download and install the updates.
  10. Finally, restart your computer and check if the error is resolved.

6. Use the Registry Editor

Adjusting settings in the Registry Editor can help fix shutdown delays by closing hanging processes. Changing registry values lets Windows automatically close unresponsive tasks during shutdown, removing the need to do it manually and making the shutdown process smoother.

It’s important to back up the registry before making changes, to ensure you can restore files if anything goes wrong.

  1. Press Windows + R to open the Run dialog.
  2. Type regedit and click OK.
  3. Navigate to:
    HKEY_LOCAL_MACHINE -> SYSTEM -> CurrentControlSet -> Control
    Open WaitToKillServiceTimeout
    Open WaitToKillServiceTimeout
  4. Double-click on WaitToKillServiceTimeout and change the value from 12000 to 2000.
    Changing Value Data
    Changing Value Data
  5. Click OK to save the changes. If the problem persists, go to:
    HKEY_LOCAL_MACHINE -> SYSTEM -> CurrentControlSet -> Services -> WpnUserService
  6. Double-click the Start entry on the right and change its value to 4.
  7. Click OK, save the changes, and restart your computer. If the issue continues, go to:
    Computer\HKEY_CURRENT_USER\Control Panel\Desktop
  8. Right-click in the right pane, hover over New, and choose String Value.
    Making a String Entry
    Making a String Entry
  9. Name it AutoEndTasks and change its value data from 0 to 1.
    Editing a String Value
    Editing a String Value
  10. After making these changes, click OK and check if the issue is resolved.

7. Run DISM Commands

Corrupted system files can cause shutdown problems like the “Task Host Window” error. Running DISM commands can find and fix these corrupted files, helping your Windows system work properly and shut down smoothly.

  1. Search for Command Prompt.
  2. Right-click on Command Prompt and choose Run as Administrator.Opening Command Prompt in Administrator ModeOpening Command Prompt in Administrator Mode
  3. Type these commands, pressing Enter after each:
    DISM /Online /Cleanup-Image /ScanHealth
    DISM /Online /Cleanup-Image /RestoreHealth
    Executing Repair Commands
    Executing Repair Commands
  4. Let the process complete.
  5. When done, restart your computer to check if the problem is fixed.

8. Turn Off Third-Party Antivirus

Third-party antivirus software can sometimes slow down shutdown by scanning or blocking important tasks. Temporarily turning off the antivirus helps the system close tasks more smoothly.

  1. Locate the antivirus icon directly on the taskbar at the bottom right.
  2. Right-click the icon and select the option to temporarily disable it.
  3. Choose Disable for 10 Minutes or a similar setting.
    Disabling Third-Party Antivirus
    Disabling Third-Party Antivirus
  4. Restart your computer and check if the issue is resolved.
ABOUT THE AUTHOR

Kamil Anwar


Kamil is a certified MCITP, CCNA (W), CCNA (S) and a former British Computer Society Member with over 9 years of experience Configuring, Deploying and Managing Switches, Firewalls and Domain Controllers also an old-school still active on FreeNode.

Comments

20
    MC
    Mikel C Sep 26, 2017

    I guess the value at method 3 is in seconds…?

      KE
      Keith Nov 2, 2017

      Milliseconds, but you are correct in that it is a Time Value

        EC
        Ed Cranford Dec 30, 2017

        Hi all, Had this problem for a quite a while, after much checking I found this solution in the forums, for me so far appears to work.

        See below this text solution posted by AymanAskar on Dec 3rd 2017. Obviously dont mess with the registry unless you are confident with doing this.

        Or…Another temporary solution, easier if you dont like registry edits, seems to work for most users with this problem, sign out as a user then sign back in. Do not restart or turn off. Then see if back to normal, on the downside you need to do this after each start. Below solution works until next Windows update which should correct the issue for all I hope.

        AymanAskar quote:
        Finally I GOT IT – I found a solution that fixed the issue for me and I think it should work for you and all who suffer from the problem. It is very easy.
        Just by these steps :

        1- Right click on start menu and click on Run. “For those who the start menu does not respond with right click, right click on taskbar – click on Task Manager – from File menu on the left upper
        corner select Run new task”.

        2-Write the command regedit and click Enter.

        3- Go to path [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesWpnUserService].

        4-Double click on Start from the right side.

        5-Change the value data to 4 then OK.

        6-Reboot.

        That’s it.

        Reply
          AS
          Aldo Fernando Guerra Santander Oct 16, 2022

          It is not a solution, you simply turned off the notifications, these for many users are necessary

      KA
      K. Arrows Author Nov 2, 2017

      Correct

    MA
    Me Again Nov 17, 2017

    https://answers.microsoft.com/en-us/insider/forum/insider_wintp-insider_desktop-insiderplat_pc/task-host-window/c47b5fca-cc6d-405e-b563-5ba0a4c82892?auth=1

    Post By:- NguyenDex

    Apparently Microsoft added a new option in the Accounts section in Windows 10 1703

    (Settings -> Accounts -> Sign-In Options) called “Use my sign-in info to automatically finish setting up my device after an update or restart.”.

    the option doesn’t really work and to turn this option off and it should fix the task host / task bar/start menu issue.

    Reply
    OS
    Olle Segergren Nov 17, 2017

    I ran into this issue after updating to the Fall Update (1709) for both my Personal Desktop and my Work Dell Laptop. The only work around I found was to restart Windows Explorer in Task Manager or signing out and back in. When I signed out I would get
    the “Task Host Window: microsoftwindowsplug and playdevice install reboot required”. After searching this I found a dutch (?) website (https://www.deskmodder.de/blog/2017/10/31/problem-bei-der-anmeldung-meine-anmeldeinfos-verwenden-um-die-geraeteeinrichtung-einem-update-oder-neustart-automatisch-abzuschliessen/).
    Apparently Microsoft added a new option in the Accounts section in 1703 (Settings -> Accounts -> Sign-In Options) called “Use my sign-in info to automatically finish setting up my device after an update or restart.”. The dutch website says (according the google
    translate) the option doesn’t really work and to turn this option off and it should fix the task bar/start menu issue. I am testing this on my desktop at the moment, shutting off/restarting my Desktop, and haven’t ran into the task bar/start menu issue yet.

    Reply
      KA
      K. Arrows Author Nov 17, 2017

      So you are saying that this option is to be turned off to fix this?

        OS
        Olle Segergren Nov 17, 2017

        Yes!

          KA
          K. Arrows Author Nov 17, 2017

          I updated the article, see the last method. Thank you for the tip.

    NS
    Nancy Staack Jan 27, 2018

    Thank you for this solution! Jesus H., I never realized I’d have to become a tech person, but without you and others like you, I’d throw my laptop out the window for good. Perfect solution to what I somehow knew was not a virus, but couldn’t figure out how to fix. Not a great way to start a Sat. Disabling the fast start up has made my computer start up faster. Go figure. Thanks again!

    PR
    PH Rest Aug 12, 2019

    All of the method doesnt work! i need help, they keep appearing again aft 15 shutdown attempts…

      SW
      Shane Warren Author Sep 5, 2019

      Try This:
      1- Right click on start menu and click on Run. “For those who the start menu does not respond with right click, right click on taskbar – click on Task Manager – from File menu on the left upper
      corner select Run new task”.

      2-Write the command regedit and click Enter.

      3- Go to path [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesWpnUserService].

      4-Double click on Start from the right side.

      5-Change the value data to 4 then OK.

      6-Reboot.

      Reply
        JL
        Jean-Eider Pierre-Louis Dec 21, 2019

        Thank you sir! You have saved my computer.

    FR
    Franky Aug 15, 2022

    Hi, and thanks for your help.
    For me the solution was to disable the hibernate (or hybrid) shutdown option in the power management settings.
    Last year i enabled that option, and everything was fine up to now.
    For some reason (new software, new microsoft update…?), that option would now prevent me to shut down my PC and i would need to force the shutdown everytime.
    If that option is “hidden”, it is probably because Microsoft know it can cause trouble…
    I keep the fast start enabled, as recommanded by Microsoft.

    FR
    Franky Aug 15, 2022

    Correction to my last post: the solution was not to disable the hibernate option, but to disable the fast start option, reboot the PC and re enable the fast start option…I believe it resets the parameters of the fast start that is stuck with some dead link.

    Reply
      MZ
      Muhammad Zubyan Author Aug 16, 2022

      Thank you so much for your input! We will add this to our article soon.

    SD
    Snoots Dwagon Aug 28, 2022

    If you recently installed Microsoft Office, remove it. Use Libra Office instead. Removing Microsoft Office immediately ended this problem for me.

    Reply
    MS
    Mark S Sep 3, 2022

    Uninstalling KB5012170 fixed it for me. But now this update has reappeared in Windows Updates, so not sure whether to risk installing it again.

    Reply
    Ἀσ
    Ἀστρονόμος Sep 9, 2022

    I have disable the fast start option long ago, but recently the task host window appear. Why? What cause it to appear? I have all programs closed. What is the real problem here? Thanks