16

Since a few days, Windows won't shut down anymore, instead, a message appears which says that "Task Host Window" is preventing shutdown.

Screenshot

And after a while, this message disappears and Windows gets back to normal instead of shutting down.

How can I fix this, without me having to click each time manually on "Shutdown anyway"?

6
  • disable the task RegisterUserDevice in task scheduler under \Microsoft\Windows\DeviceDirectoryClient and look if windows still works. Aug 17, 2017 at 15:38
  • Have you tried these options.
    – BDRSuite
    Aug 17, 2017 at 16:48
  • @magicandre1981 "Look if Windows still works"? Sounds not ver promising to me! Aug 18, 2017 at 9:41
  • @vembutech Method 3 worked, thanks. If you post this as an answer, I can officially tag it. Aug 18, 2017 at 9:48
  • Ms no longer documents what all those tasks do, so do some trial error. this task invokes the DeviceDirectoryClient.dll but I have no idea what this dll does. Aug 18, 2017 at 15:24

6 Answers 6

1

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.

This URL may expire or deleted so, I have pasted here the answer.

1
  • Having this issue starting to happen (all of the sudden) years. This solution never worked for me!!! Or anything I could find...
    – empleat
    Jan 6, 2022 at 19:44
12

This problem is related with the new Fast Startup (also name as Hybrid Shutdown) feature introduced in Windows 10. If you are facing Shutdown or Reboot problems in Windows 10, you can get rid of it by disabling this new Fast Startup/Hybrid Shutdown feature and doing a complete shutdown.

  1. Press Windows Key + R then type powercfg.cpl to open Power Options window.
  2. Click on the “Choose what the power buttons do” link
  3. Find “Turn on fast startup (recommended)” option given in Shutdown settings section. Uncheck the checkbox to disable the option. Click “Save Changes” button.
  4. Restart your system.

Read more: https://windows10freeapps.com/task-host-window-prevents-shut-down-windows-10/

2
  • 1
    I can confirm that turning this feature, and my PC, off and on again, allows me to successfully turn my PC off and on again.
    – IMSoP
    May 9, 2018 at 22:44
  • unfortunately it appears microsoft removed that specific setting from that window, and I was unable to locate where they placed it instead. Jul 6, 2018 at 15:10
1

The same message appeared every time I shut down Windows 10. But now the problem has been solved. I ran Windows Defender Offline. Thereafter the message did not appear at all and the System shuts down smoothly and quickly.

Settings --> Update and Security --> Windows Defender --> Open Windows Defender Security Center --> Virus and Threat protection --> Advanced Scan --> Windows Defender Offline Scan --> Scan now.

Reply

0

You all might think I am totally nuts ... but ... I have been scouring the net looking for a reliable solution to this problem ... today I had to do a reinstall of Microsoft Office ... since doing so ... the msg regarding host task window doesn't appear and Start Button etc is working as normal ... This may have been a fluke ... but ... has worked for me ... hope it works for you too

0

I had this problem too. Settings --> Update and Security --> Windows Defender --> Open Windows Defender Security Center --> Virus and Threat protection --> Advanced Scan --> Windows Defender Offline Scan --> Scan now. Same as Kannan worked fine for me. After looking Microsoft website for some time, it seems this is linked with a step getting stuck during fast reboot process. Running windows defender or putting off fast reboot is just cleaning the task list. You should theoretically be able to re-activate fast boot after you have done a reboot without it.

0

As of 2023 the only solution that has worked for me is preventing any application from blocking the shutdown of Windows (which can be risky if you're prone to leave work unsaved or like to be reminded of this). In practice, you will see the task host prompt, but after a few seconds it will shutdown anyway.

Steps:

  1. Windows key + R, type regedit and press run
  2. Navigate to HKEY_CURRENT_USER\Control Panel\Desktop
  3. Right click in the right pane > New > String Value > Rename it to AutoEndTasks (if it doesn't already exist)
  4. Set AutoEndTasks value to 1

The next step is optional and it serves to speed up how long it waits until forcing the shutdown: 5. In HKEY_CURRENT_USER\Control Panel\Desktop (same folder we were before) edit WaitToKillAppTimeout entry to 2000 (in ms, 2 seconds, by default it waits 5s or 5000ms). If you really don't want to wait at all, maybe try with a 0 value (haven't tested this).

Reset and the next shutdown if there's a blocking application, you'll see the prompt but after a few seconds shutdown will be forced anyway.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .