Task Host is a Windows program, not a virus or malware. So you don’t have to worry about it being a virus damaging your system. When you shut down your system, Task Host ensures that programs previously running were closed properly to avoid data and program corruption.

Task Host is Stopping Background Tasks

An example of this would be a notepad file or a word file open, whilst it’s open if you attempt to shut down, the Task Host window will be shown.

Technically, it is recommended to close all running programs before you initiate a shutdown/reboot. However, if you feel that no programs were running before you shut down, then follow the steps/methods below.

Repair Corrupt System Files

Download and run Restoro to scan and repair corrupt/missing files from here, if files are found to be corrupt and missing repair them and then see if the problem persists if it does, move on to the next Method below.

Turn Off Hybrid Shutdown/Fast startup

On Windows 8 and 10, the issue is usually caused by Hybrid Shutdown and the Fast Startup feature designed to speed up Windows. Technically, this feature when enabled pauses the running processes in their existing state instead of closing them, so when the system resumes its operations it doesn’t have to re-initiate the programs from scratch, instead, it just restores the processes and resumes it from there. This technique allowed MS to boost speed but no idea why they did not diagnose and address the “Task Host” about this feature.

Therefore the method in this guide is to disable the use of Hybrid Shutdown/Fast Startup.

Hold the Windows Key and Press R. In the run dialog, type powercfg.cpl and click OK.

Click on Choose what the power buttons does from the left pane

Then choose Change settings that are currently unavailable. Click Yes if the User Account Control warning appears.

Now in the Shutdown settings section, clear the check next to Turn on fast startup (recommended) to disable it. Click the Save changes button. Now restart your system and test, if the issue is still not resolved then follow Method 2.

Edit WaitToKillServiceTimeout via Registry Editor

WaitToKillServiceTimeout determines how long the system waits for services to stop after notifying the service that the system is shutting down. This entry is used only when the user issues a shut-down command by clicking the Shut Down

Hold the Windows Key and Press R. Type regedit and click OK. Navigate to the following path: 

HKEY_LOCAL_MACHINE -> SYSTEM -> CurrentControlSet -> Control

In the Right Pane double click WaitToKillServiceTimeout and change the value to 2000, Click OK. By default, the value is 12000.

Now navigate to the following path:

HKEY_CURRENT_USER -> Control Panel -> Desktop.

With Desktop highlighted in the left pane, right-click in the blank space in the right pane and choose New > String Value. Name the String Value WaitToKillServiceTimeout.

Now Right-click on WaitToKillServiceTimeout and click Modify. Under Value data, type 2000 and click OK.

Exit out of Registry Editor and reboot. Then test to see if the issue is resolved or not, if not then proceed to Method 2.

Modify Account Settings

After the recent 1709 update by Windows, many system functions began conflicting and numerous problems arose. One of these problems is the one we are discussing. There is a workaround present for users experiencing this problem post-1709 update.

  1. Press Windows + S to launch the search bar. Type “account” in the dialogue box. Open the first relevant result which comes forth.

  1. Once in the account settings, navigate to “Sign-in options” and uncheck (turn off) the option “Use my sign-in info to automatically finish setting up my device after an update or restart”.

  1. Restart your computer and check if the problem has been solved.

Install the Delayed Update

The “Task Host Windows is Preventing Shutdown” error is sometimes seen when an update file has been downloaded on the computer but for some reason, it can’t be installed. To fix this issue, we will be running the Windows Update Troubleshooter. For that:

  1. Press the “Windows” + “I” keys simultaneously to open the settings.
  2. Click on the “Update & Security” option.Opening Update & Security Options
  3. In the left pane, click on “Troubleshoot” and selectWindows Update” from the list.Selecting Troubleshoot from the left pane
  4. Click on the “Run the Troubleshooter” option.Clicking on the “Run the Troubleshooter” option
  5. The troubleshooter will automatically detect the problem and solve it by implementing a fix.
  6. Wait for the update to be installed and check to see if the issue persists.

Run a Windows Defender Offline Scan

Windows Defender is the default Antivirus for Windows and it has improved a great deal over its predecessors with new virus definitions and fast scans. In this step, we will be using the Windows Defender to scan our PC for malware/viruses which can prevent the Task Host from initiating a shutdown. For that:

  1. Press the “Windows” + “I” keys simultaneously to open the run prompt.
  2. Click on the “Update and Security” option and click on “Windows Security” in the left pane.Selecting Windows Security from the left pane
  3. Click on the “Virus & Threat Protection” option and select the “Scan Options” button.Clicking on the “Virus & Threat Protection” option
  4. Check the “Windows Defender Offline Scan” option and click on the “Scan Now” button to initiate the scan.Checking the “Windows Defender Offline Scan” option and clicking on the “Scan Now” option
  5. Check to see if the issue persists after the scan is finished.