Skip to content

COM and Windows API result

0x80070005 E_ACCESSDENIED

Access was denied: Windows refused permission to a file, folder, registry key or service the operation needed. It is Win32 error 5 wrapped as an HRESULT.

Where you will see it

  • Windows Update
  • Installing or updating an app
  • Microsoft Store
  • Copying or deleting files
  • Scheduled tasks and scripts

Likely causes, most common first

  • The program is not running as administrator.
  • Security software is blocking the change.
  • Permissions on the folder or registry key were changed.
  • A file is owned by another account or is in use.

How to fix it, in this order

Start with the first fix and check the result before moving on; each one says how to tell that it worked.

1. Run it as administrator (easy)

  1. Right-click the installer or program and choose Run as administrator.
  2. For a command, use Terminal (Admin).

It worked if: The step that failed now completes.

2. Pause third-party security software for one try (easy)

  1. Pause the antivirus or firewall from its tray icon.
  2. Try once more, then turn it back on.

It worked if: If it works with protection paused, add an exception in that product rather than leaving it off.

3. Run the Windows Update troubleshooter (easy)

  1. Open Settings, System, Troubleshoot, Other troubleshooters.
  2. Press Run next to Windows Update and apply what it suggests.
  3. Restart and check for updates again.

It worked if: Check for updates finishes without the error.

What Microsoft's documentation says

Microsoft's own wording for this code, quoted from the page named under each quote. The plain-English explanation and the fixes above are ours.

“General access denied error”
Listed as E_ACCESSDENIED in Common HRESULT Values on Microsoft Learn. Read 22 November 2026.
“Access is denied.”
Listed as ERROR_ACCESS_DENIED (5) in System Error Codes (0-499) on Microsoft Learn. Read 22 November 2026.
“File system or registry key permissions have been changed and the servicing stack doesn't have the required level of access.”
Listed as E_ACCESSDENIED in Common Windows Update errors on Microsoft Learn. Read 22 November 2026.

Microsoft’s fix: open the newest CBS.log in %Windir%\Logs\CBS, find the “, error” line at the time of the failure, and correct the permissions on the file or registry key it names.

The same code, written other ways

Search a log or a forum for any of these; they are all this code.

How the code is put together

Read from the bits as Microsoft's [MS-ERREF] Windows Error Codes specification lays them out.

Codes that often come with it

More than one code in your log?

Paste the whole CBS, DISM or Windows Update log into the decoder. It lists every code in it, in order, with the line it was on. Decoded in your browser; nothing is sent.

Open the error code decoder →