Windows Update error 0x80070006

22,176

Solution 1

I have had this issue on my work PC and found that errors reporting an invalid handle can arise from Windows Update running in its own process.

You can try checking if Windows Update is running in its own process, and if it is, set it to share and reboot.

To check if it is in its own process, you can run sc query wuauserv in an elevated command prompt, and check what TYPE is reported. For example, one that is is set to run as its own process will look like this:

Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>sc query wuauserv

SERVICE_NAME: wuauserv
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 4  RUNNING
                                (STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

To set it to shared (as it should be), run sc config wuauserv type= share, then reboot your PC (reboot is necessary because of some issue with SIDs not being correct without bringing down the shared process).

Once done, Windows Update should be working (provided there is nothing else wrong with it) and running sc query wuauserv should return a TYPE of 20 WIN32_SHARE_PROCESS.

Solution 2

Lack of SeDebugPrivilege in wuauserv service RequiredPrivileges registry setting could be the reason of 80070006 error. Try to add SeDebugPrivilege at end of RequiredPrivileges list then restart wuauserv service. The setting is available at :

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\wuauserv

I don't know the reason but in our network this privilege is set in most of Windows Server 2019 by default but not set in 2016 ones.

Be aware as discussed here SeDebugPrivilege is the highst access permission you could give to a user. Use it at you own risk.

Share:
22,176

Related videos on Youtube

Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    Admin almost 2 years

    I've noticed that my Windows 10 is no longer updating itself. When I run the Settings app and issue an update command, this message appears.

    There were some problems installing updates, but we'll try again later. If you keep seeing this and want to search the web or contact support for information, this may help: (0x80070006)

    Of course, standalone updates install well. I have also been able to run a manual update from PowerShell and get Windows 10 to build 14393.970. Plus, Windows Defender keeps updating itself, so updating in general is possible.

    I have tried running Microsoft Windows Update Troubleshooter. (The latest version from Microsoft website.) Nothing happened. I have also tried an equivalent from tenforums.com. Not only did it not fix my problem, it broke Windows Defender too. (System Restore came to rescue.)

    • Lenniey
      Lenniey about 7 years
      What hardware are you using Windows 10 on? Did you try to delete the Windows Update cache and reinitialize Windows Update?
    • Tim G.
      Tim G. about 7 years
      Over 100 people found this helpful, but I wouldn't think a Windows Update would try downloading to any other drive besides C:.
    • Jeff Zeitlin
      Jeff Zeitlin about 7 years
      If it's any help, the textual equivalent of that message number is "The handle is invalid".
    • magicandre1981
      magicandre1981 about 7 years
      0x80070006 = invalid handle. I have no real idea how to trace this. update to Windows 10 1703 Creators Update and look if WU works here or not
  • Admin
    Admin about 7 years
    Well, that's another bug to add to the ENDLESS list of Windows 10 bugs.
  • Ian Gregory
    Ian Gregory about 7 years
    I found a well-regarded Windows "clean up" powershell script set to make the Windows Update service run in it's own process. I've had to revert this on several PCs due to the error message discribed in this question.
  • Ben N
    Ben N about 7 years
    Please don't add "thank you" as an answer. Once you have sufficient reputation, you will be able to vote up questions and answers that you found helpful. - From Review
  • M Seck
    M Seck about 7 years
    Thank you was never used, the point of the post was to mention that you may have to run this command multiple times it's not a 1-run fix and most people would probably abandon this 'fix' if it doesn't work the first time. I also wanted to note it wasn't me that found the command hence mentioning the other user.
  • Ramhound
    Ramhound about 7 years
    "well done Logan Dam", is what Ben is talking about when he says not to add "thank you", the original revision of this answer was basically a comment to an existing answer
  • Paul
    Paul almost 7 years
    Note that the sequence of steps provided did not resolve the issue for us. What was needed was after validating the service with the command SC QUERY WUAUSERV the next step needed to be SC STOP WUAUSERV then SC CONFIG WUAUSERV Once that was successful the command SC START WUAUSERV was used. At this final point the SC QUERY WUAUSERV command correctly shows the results TYPE : 20 WIN32_SHARE_PROCESS Paul B
  • overflowed
    overflowed about 3 years
    thank you !, this worked for me.