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.
An example of this would be a notepad file or a word file open, whilst it’s open if you attempt to shut down, 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 prior to you shutting down, then follow the steps/methods below.
Method 1: Repair Corrupt System Files
Download and run Reimage Plus 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 onto the next Method below.
Method 2: 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 it’s operations it doesn’t have to re-initiate the programs from scratch, instead it just restore 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” in relation to 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.
Method 3: 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 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 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.
Method 4: Modifying Account Settings (For Users Affected after 1709 update)
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.
- Press Windows + S to launch the search bar. Type “account” in the dialogue box. Open the first relevant result which comes forth.
- 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”.
- Restart your computer and check if the problem has solved.
Method 5: Installing 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. In order to fix this issue, we will be running the Windows Update Troubleshooter. For that:
- Press the “Windows” + “I” keys simultaneously to open the settings.
- Click on the “Update & Security” option.
- In the left pane, click on “Troubleshoot” and select “Windows Update” from the list.
- Click on the “Run the Troubleshooter” option.
- The troubleshooter will automatically detect the problem and solve it by implementing a fix.
- Wait for the update to be installed and check to see if the issue persists.
Method 6: Running 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 shutdown. For that:
- Press the “Windows” + “I” keys simultaneously to open the run prompt.
- Click on the “Update and Security” option and click on “Windows Security” in the left pane.
- Click on the “Virus & Threat Protection” option and select the “Scan Options” button.
- Check the “Windows Defender Offline Scan” option and click on the “Scan Now” button to initiate the scan.
- Check to see if the issue persists after the scan is finished.