The ‘task host is stopping background tasks’ error appears when you try to shut down your computer. It prevents your system from shutting down even if you try to ‘force shut down.’ Forcing shutdowns is generally not a good idea but if it takes a long time, you may long press the power button as a last resort.
Waiting for a while usually fixes it, but If it doesn’t, you can follow through with us in this article to know what causes it and how to fix it.
Why is Task Host Stopping Background Tasks?
This issue pops up because there’s probably a Windows update or another service installing in the background which is holding off the shutdown process. It usually stays up for some time and automatically shuts off after the process ends. However, if it’s not, you can try the methods below and fix the issue.
How to Fix Task Host Preventing Shutdown?
These types of errors usually stay up for 30- 60 seconds and resolve by themselves. However, if it is holding the shutdown process for a fairly long time, the installation process might be encountering issues. Here are some possible fixes you can try from:
Check Windows Update
Since Windows is trying to install updates and preventing your PC from shutting down, you might want to wait until it’s done. You can check the progress of the Update in windows update settings.
The steps below will guide you on how to check the progress.
- Press the Windows key + I to open settings.
- Click on Updates & Security.
- Select Windows update on the left pane.
- Click on Check for updates.
This will show you the current state of the update process.
You can also check the update history by clicking on the ‘View update history.’ Pausing the update is also a good solution to pause the windows update temporarily. Just click on ‘Pause updates for 7 days.’ It will even pause any ongoing update process.
Restart InstallService Service
The Installservice is a windows service that deals with installing windows system programs. You can try restarting this service. Here’s how you do it:
- Right-click on the taskbar and click on the task manager.
- Go to the Services tab.
- Look for ‘Installservice.’ Sort by name and navigate to “I” for easier findings.
- Right-click on the service and click Restart.
Perform a Clean Boot
A clean boot excludes all services except for verified Microsoft services. Third-party services may conflict with the basic Microsoft services, which causes issues. You can learn how to do a clean boot here:
Windows + R,type
msconfigin the box, and press Enter.
- Go to the Services tab.
- Tick the box labeled ‘Hide all Microsoft services.’
- Click Disable all and press Ok.
- It will then ask you to restart your computer. You need to force restart your computer to apply the changes. You can either restart now or click Exit without Restart to apply the changes next time you boot your computer.
Note: Do remember to revert all the changes later.
Scan for Corrupt Files
You can use the sfc /scannow command in the command prompt to scan your system for corrupt files. This command will automatically scan for corrupt files and fix them for you.
- Search for
cmdon the search bar and Run as administrator.
- Type the following command and press Enter after each command:
DISM /Online /Cleanup-Image /Restore Health
Disable Fast Startup
The fast startup is a Windows feature that makes the computer load faster when starting. When Windows fast startup is enabled, windows goes into a hybrid of shutting down and hibernating when you press the shutdown button. Also, the next time you turn it on, it just resumes the session. You can disable this mode in the power options.
Here’re the steps:
- Go to power options by right-clicking on the battery icon in the taskbar.
- Click on Choose what the power button does in the left panel.
- Click on Change settings that are currently unavailable. It might ask you to input your administrator password.
- Untick the Turn on fast startup (recommended) to disable the fast startup.
Perform Defender Offline Scan
The defender offline scan is a deep scan that executes when restarting. This will even remove difficult malware that cannot be detected otherwise.
Here’re the steps:
- Press Windows key + I to open settings.
- Click on Update & Security.
- Select Windows security on the left pane.
- Click on Virus & Threat protection.
- Click on Scan options.
- Scroll down and select choose Microsoft defender offline scan
- Click on Scan now. It will restart your computer and start the scan after the restart.
Windows Update Troubleshooting
You can use the built-in Windows troubleshooter to troubleshoot any issues in updating. The program will automatically search and fix any issues found. Follow these steps to learn how to do it.
- Press the Windows key + I
- Select Updates and Security.
- Click on Troubleshoot.
- Click on Additional troubleshooters.
- Expand Windows Update and click on Run the troubleshooter. This will automatically check for faults and fix them for you.
We highly recommend backing up the registry before making any changes to it(LINK). The registry is an important part of the computer, so if you want to change it back, then the backup will come in handy. You will be fine if you just follow these steps.
- Press Windows key + R to open Run.
regedit, and press Enter.
- Follow through to this root in the registry editor:
- Right-Click on the WaitToKillServicesTimeout and set the value data to 3000 and click OK.
- Then again, go to this root:
- Right-click on the WaitToKillServiceTimeout again and set the value to 3000 and click OK.
This changes the time the system waits to force kill the service. Setting the value very low is not a great idea because the service won’t have enough time to save its work, and the abrupt shutdowns could also cause data corruption.