Windows update Error 0x80070005 - Need a fix? Click here.

Anonymous
2009-07-02T19:01:34+00:00

The error code 0x80070005 is also described as ACCESS DENIED. 

Please follow these instructions if you are encountering this error code when checking or installing updates via Windows Udpate. 

To correct the problem, you can try the steps below. Keep in mind that these steps are still experimental. I look forward to your feedback and results. For the long term, we hope that we can create an automated solution for all.

  1. Download and install SubInACL from the Microsoft Download Center http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=23510
  2. Open Notepad (Click Start, type Notepad, and then press Enter)
  3. Copy and paste the following text into Notepad

Set OSBIT=32

IF exist "%ProgramFiles(x86)%" set OSBIT=64

set RUNNINGDIR=%ProgramFiles%

IF %OSBIT% == 64 set RUNNINGDIR=%ProgramFiles(x86)%

subinacl /subkeyreg "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing" /grant="nt service\trustedinstaller"=f

  1. Close Notepad, and make sure you save it. When you save the text, make sure that you set

Save as Type to “All Files (*.*)”. Very important! The file name needs end with .CMD. For example: fix.cmd. Lastly, when you save the file, make sure you save it at a location where it will be easy for you to find.

  1. Right click on the file that you just saved in step #4, and select “Run as Adminstrator”

To confirm that you have the symptoms and to validate the problem, please see the below:

The following is applicable to Windows 7 and Windows Vista .

  1. Download AccessChk (Sysinternals).  This tool allows you to evaluate the access level of specific users or groups of resources including files, directories, Registry keys, global objects and Windows services.  Here's the link to download the tool: http://technet.microsoft.com/en-us/sysinternals/bb664922.aspx

2. Save the zip file on your desktop, and extract the file:

  • Right click on the file, and select Extract All...
  • Click Next when prompted for the Destination.

As a result, you should see a folder called AccessChk  on your desktop.

  1. Open the folder AccessChk 
  2. Hold the shift-key and right click in the window.  Select "Open Command Prompt Here"
  3. A command prompt window should open with a similar prompt:

C:\Users<USERNAME>\Desktop\accesschk>

6.  Type the following command, and press Enter:

accesschk.exe -s -n "nt service\trustedinstaller" -k "hklm\software\Microsoft\Windows\CurrentVersion\Component Based Servicing" >accesskchk.txt

Tip: You should be able to copy and paste the command into the command prompt.

  1. Close the Command Prompt Window.  Open the Accesschk folder on yoru desktop (if it has been closed).
  2. Double click on Accesschk.txt (the text file), this should open Notepad.

9.  Copy and Paste your results with a new question on the Windows Update forum.  (Make sure you write 0x80070005 in the subject line).

Cheers!

Kim N. L.

Microsoft Partner Technical Technical Lead

Windows for home | Windows 11 | Windows update

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Anonymous
2011-10-13T21:55:56+00:00

Hello all,

I would like to apologize for the delayed response on this thread.  All the results (logs) that you have all posted in the thread are helpful.    Based on the various results, it’s evident that the problem has a common cause.  

Here’s a little background on the problem that you are experiencing:

When you use Windows Update to install updates for Windows Vista and Windows 7, the process relies on the Windows Module Installer (trustedinstaller.exe).  The TrustedInstaller is the online interface to the servicing stack.  To keep things simple, it’s one of the most important components when you install updates.   This method also allows Windows to be serviced (to install updates) without the need of an administrator.  In fact, when the components of Windows are being updated, it’s the TrustedInstaller that is used to update the operating system files. 

Furthermore, when you look at the security settings of certain servicing components of Windows, you would notice that the TrustedInstaller is the only item listed under the User Name and Groups with full permissions.   This is only true if the respective folder or registry key is kept at its default state.  In other words, changes to these security settings would cause the ACCESS DENIED (0x80070005).  It’s difficult to associate a culprit to the unwanted changes.   A possible cause that was previously mentioned is malware.

Awhile ago, I asked the community to run a Sysinternal Tool known as Access Check to capture the details of the problem.  The output of the tool would list all of the servicing components where the security permissions restricted the TrustedInstaller.  As a result, when you try to install updates for Windows, you would obtain the error 0x80070005 – also known as ACCESS DENIED.  In summary, it is the TrustedInstaller that has been denied of access to a component that it should have access to.

Here’s an example of the output:

HKLM\software\Microsoft\Windows\CurrentVersion\Component Based Servicing\Retry Agent

HKLM\software\Microsoft\Windows\CurrentVersion\Component Based Servicing\Sqm

HKLM\software\Microsoft\Windows\CurrentVersion\Component Based Servicing\Sqm\VistaSP1-KB936330~31bf3856ad364e35~x86~~6.0.1.18000

HKLM\software\Microsoft\Windows\CurrentVersion\Component Based Servicing\Sqm\VistaSP1-KB936330~31bf3856ad364e35~x86~~6.0.1.18000\InstallCounter

As you can see from the above, there are four registry keys with unexpected security settings.

...The Solution...

To correct the problem, you can try the steps below.  Keep in mind that these steps are still experimental.   I look forward to your feedback and results.  For the long term, we hope that we can create an automated solution for all.

1.       Download and install  SubInACL from the Microsoft Download Center http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=23510

2.       Open Notepad (Click Start, type Notepad, and then press Enter)

3.       Copy and paste the following text into Notepad

Set OSBIT=32

IF exist "%ProgramFiles(x86)%" set OSBIT=64

set RUNNINGDIR=%ProgramFiles%

IF %OSBIT% == 64 set RUNNINGDIR=%ProgramFiles(x86)%

subinacl /subkeyreg "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing" /grant="nt service\trustedinstaller"=f

4.       Close Notepad, and make sure you save it.  When you save the text, make sure that you set

Save as Type to “All Files (*.*)”.  Very important!  The file name needs end with .CMD.  For example:  fix.cmd.  Lastly, when you save the file, make sure you save it at a location where it will be easy for you to find.

5.       Right click on the file that you just saved in step #4, and select “Run as Adminstrator”

Thanks and I look forward to your feedback.

Kim

Was this answer helpful?

700+ people found this answer helpful.
0 comments No comments

128 additional answers

Sort by: Oldest
  1. Anonymous
    2011-11-18T06:39:47+00:00

    Kim,

    I do see a check beside "Full control"  when I click on "Administrators" after following your 4 steps.  In fact I see the same check beside "Full control" for all of the listed group or user names when I click on "Authenticated Users", "SYSTEM" and "Users".

    I have went in and taken "ownership" of the drive as listed on another website.  Nothing has changed.

    Now what?

    Al

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2011-11-18T19:04:17+00:00

    Hi Al,

    That's very odd.  The only groups/user that should have full control is SYSTEM and the Adminstrators group.    Futhermore, it's very unusual that Windows update is trying to write to the root of your C: drive.  I'm suspecting that there is more to it.

    Do you know which update (specifically) is causing the error that you have described?

    Just to be sure - You're getting the error 0x80070522 when checking for updates on a Windows 7 machine - is this correcT?

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2011-11-19T07:22:38+00:00

    The error code 0x80070005 is also described as ACCESS DENIED. 

    Please follow these instructions if you are encountering this error code when checking or installing updates via Windows Udpate. 

    **The following is applicable to Windows 7 and Windows Vista .**1. Download AccessChk (Sysinternals).  This tool allows you to evaluate the access level of specific users or groups of resources including files, directories, Registry keys, global objects and Windows services.  Here's the link to download the tool: http://technet.microsoft.com/en-us/sysinternals/bb664922.aspx

    2. Save the zip file on your desktop, and extract the file:

    • Right click on the file, and select Extract All...
    • Click Next when prompted for the Destination.

    As a result, you should see a folder called AccessChk  on your desktop.

    1. Open the folder AccessChk 
    2. Hold the shift-key and right click in the window.  Select "Open Command Prompt Here"
    3. A command prompt window should open with a similar prompt:

    C:\Users<USERNAME>\Desktop\accesschk>

    6.  Type the following command, and press Enter:

    accesschk.exe -s -n "nt service\trustedinstaller" -k "hklm\software\Microsoft\Windows\CurrentVersion\Component Based Servicing" >accesskchk.txt

    Tip: You should be able to copy and paste the command into the command prompt.

    1. Close the Command Prompt Window.  Open the Accesschk folder on yoru desktop (if it has been closed).
    2. Double click on Accesschk.txt (the text file), this should open Notepad.

    9.  Copy and Paste your results with a new question on the Windows Update forum.  (Make sure you write 0x80070005 in the subject line).

    Cheers!

    Kim N. L.

    Microsoft Partner Technical Technical Lead

    The AccessChk folder flashes open and shut - cannot follow any further beyond that stage

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2011-11-23T22:02:23+00:00

    Kim,

    I had not experienced this problem until recently.  I am running Windows 7 Home Premium 64 bit and I HATE it at this point.  I have never had the problems I have had with W7.  I started in 1986 with a TRS 80 and moved up through DOS and through all of the windows versions.  I have 7 machines running XP Pro and never have a problem with any of them.  Instead I have spent hours trying to figure out why W7 has this problem

    Error 0x80070522: A required privilege is not held by the client I can't save to my Drive C root.  I can save anywhere else but not there.  As near as I can figure the problem started when I downloaded and started using Microsoft Defender.  Defender changed the settings on my computer to all automatic updates.  I had found back on Win 2k that the updates often caused problems and the only updates I do are the service pack updates.

    I have read all of your suggestions and did the accesschk and here is what mine said "Error opening HKLM\software\Microsoft\Windows\CurrentVersion\Component Based Servicing:

    Access is denied.

    No matching objects found."

    I tried the stop the Windows Updater and then changing the SoftwareDistribution folder and restarted the machine.  All with no results.

    So now what?  I see this has been going on at least since 2009 without any fixes by Microsoft.  What the heck.  What do we do now?

    I dislike the forum format because companies use it to avoid helping the people who have purchased their buggy software.  I don't feel like I should have to spend hours researching a problem that is at least 2 years old.

    Sorry to sound so bitter, but this is taking a huge amount of my time, and as we all know if I am working on a microsoft problem, then I am not working on my business.  Time is money and microsoft doesn't seem to have a problem wasting my time with their failures.

    Thanks,

    Al

    Hi Al,

    I am sorry to hear about all the trouble that you have had with Windows 7.

    The format of a forum as a medium for support has its pros and cons, but I rather leave that for another day.

    As for the problem you are describing, it's sounds different but similar in other ways. To start, I was wondering if you could have a look at the Security settings for your C: drive. Here is how:

    1. Open Computer (from the Start Menu)
    2. Right Click on C: then select Properties
    3. Go to the Security tab
    4. Select "Adminstrators"

    After the 4 steps, you should see a list of "Permissions for the administrators". Please let me know if you see a check mark beside "Full control".

    If you do not, then something went wrong. I can also assure you that updates from Windows Update would not cause this.

     

     

     

    Kim,

    I had responded to your email but didn't realize the email wouldn't go anywhere because you were using a no response email address.  I have been waiting to hear your response.

    I followed your steps above and found the check mark beside "Full Control".  As far as your statement about "Windows Update" not causing this, we both know "Windows Updates" have not always worked the way they were intended.  Errors happen and sometimes the "Windows Updates" have been the cause of them.

    Yes, the error is "Error 0x80070522: A required privilege is not held by the client".  I cannot write or paste a file to the root of C Drive.  I can paste or create a new file in any of the existing folders but not on the root.

    I do not know that it was a "windows update" but I do know it wasn't a problem until I installed Windows Security Essentials and it changed the status of my update policy for the computer.  As I stated before, I don't do windows updates other than the Service Pack upgrades.  I have had issues before with a 2k system where the update disabled the drag and drop feature of the system.  I was never able to get that system back to the place it was before the Microsoft update that went wrong.

    I have spent many hours researching this and still no answers.  Is there someone at Microsoft that knows what causes this error on windows 7?

    Al Berger

    Was this answer helpful?

    0 comments No comments