Error 0x80070005 means "access denied": Windows Update doesn't have permission to touch a file, folder or registry key it needs to install the update. Microsoft identifies it as E_ACCESSDENIED, and it's almost always fixed by one of three things: installing with an administrator account, pausing your antivirus for a moment or clearing the Windows Update cache. If none of that works, there are still the DISM and SFC repairs and, as a last resort, resetting the permissions on the system folders.

Work through them in order: after each step, restart and try again in Start > Settings > Windows Update > Check for updates. That way you'll know what fixed it and you won't make more changes than necessary.

Quick fixes

1. Use an administrator account. Some updates require administrator rights. If your account is a standard one, sign in with an administrator account or ask someone who has one to install the update.

2. Pause your antivirus or firewall. Third-party antivirus software can lock the files Windows Update is trying to change, and it's one of the causes Microsoft points to. Open the program from the Start menu, look for the option to disable or pause protection (usually under Settings, Tools or Protection) and choose a short period, such as 10 minutes or an hour. While you're at it, update the antivirus itself. If the problem persists and you suspect it, you can try to uninstall the antivirus completely and reinstall it afterwards; keep your product key handy.

3. Run the troubleshooter. In Windows 11 it's under Start > Settings > System > Troubleshoot > Other troubleshooters: find Windows Update and select Run. In Windows 10, the path is Settings > Update & Security > Troubleshoot > Additional troubleshooters (if you're not sure which one you have, here's how to check whether you have Windows 10 or 11).

4. Check the basics. Turn on Set time automatically and Set time zone automatically in Settings > Time & language > Date & time, disconnect external drives and docks, and make sure you have enough space: Microsoft asks for at least 20 GB free to update a 64-bit version of Windows (16 GB for 32-bit).

Clear the Windows Update cache

Person using a laptop with Windows 11 next to a window

If update downloads were left half-finished or with the wrong permissions, the most effective fix is to force Windows to start from scratch. Search for Command Prompt in Start, right-click it, choose Run as administrator and type these commands one after another:

net stop wuauserv
net stop bits
net stop cryptSvc
ren %windir%\SoftwareDistribution SoftwareDistribution.old
ren %windir%\System32\catroot2 catroot2.old
net start cryptSvc
net start bits
net start wuauserv

The first three stop the update services, the two ren commands rename the folders where Windows stores downloads and catalogues (nothing important is deleted: Windows recreates them) and the last ones start the services again. Restart and check for updates again.

Repair Windows with DISM and SFC

If Windows Update keeps failing, the problem may lie in the system files themselves. In the same administrator Command Prompt, run this first:

DISM /Online /Cleanup-Image /RestoreHealth

It takes a few minutes and should finish with "The restore operation completed successfully". Then run:

sfc /scannow

Wait until it reaches 100%, restart and try again. Microsoft also recommends checking the drive with chkdsk /f C: (it will ask you to restart) and, if you suspect a program, performing a clean boot of Windows.

Last resort: reset the permissions

According to Microsoft, the most common cause of 0x80070005 is misconfigured permissions on the WinSxS and SoftwareDistribution folders, especially when the TrustedInstaller service account can no longer write to them. Before you touch anything, back up your system drive, because these commands change permissions on thousands of files. Then, as administrator:

icacls "%windir%\WinSxS" /reset /t /c /q
icacls "%windir%\SoftwareDistribution" /reset /t /c /q
icacls "%windir%\WinSxS" /setowner "NT SERVICE\TrustedInstaller" /t /c /q

The first two restore the default inherited permissions and the third makes TrustedInstaller the owner of WinSxS again. Restart and try again.

If it still won't work, you can always uninstall the latest problematic update or, in the worst case, reinstall Windows 11 using Microsoft's official tool, ideally with your files already backed up.