Access denied (0x80070005)
Windows or a program has no permission to change a file: often an antivirus, a broken update folder or a wrong user account.
How to fix it
- Run the Windows Update troubleshooter: Settings > System > Troubleshoot > Other troubleshooters > Windows Update.
- Turn off or uninstall third-party antivirus for a moment (Windows Security stays on), then try again.
- Reset Windows Update: in Terminal (Admin) run net stop wuauserv and net stop bits , rename C:\Windows\SoftwareDistribution to SoftwareDistribution.old, then net start wuauserv and net start bits .
- Repair Windows files: open Terminal (Admin) and run DISM /Online /Cleanup-Image /RestoreHealth then sfc /scannow and restart.