Home
›
DevOps
›
0x80070005 Access Is Denied When Installing: Run as Administrator and Fix Permissions
Beginner
3 min · December 4, 2026
0x80070005 Access Is Denied When Installing: Run as Administrator and Fix Permissions
0x80070005 (E_ACCESSDENIED) during an install means the installer couldn't write to a folder or registry key.
N
Naren
Founder & Principal Engineer
20+ years shipping production infrastructure and CI/CD at scale. Lessons pulled from things that broke in production.
Follow
✓ Production
production tested
December 04, 2026
last updated
2,144
articles · all by Naren
VIDEO
⚡ Quick Answer
The installer couldn't write somewhere: usually Program Files or the registry. Admin accounts run with a standard token until UAC elevates them. Fix: right-click → Run as administrator, or use an elevated PowerShell. Still denied while elevated? Check the folder in the setup log, its permissions (icacls), and antivirus.
✦ Definition ~90s read
What is Windows Error 0x80070005?
0x80070005 is E_ACCESSDENIED: Windows refused a write. During installs it usually means the installer ran without administrator rights, or a folder's permissions block it.
★ Program Files has a locked door.
Plain-English First
Program Files has a locked door. Being on the admin list isn't enough; you have to show the admin badge by approving the UAC prompt.
An admin ran setup.exe from a normal PowerShell window. It failed halfway with 0x80070005.
Run elevated Start PowerShell as administrator, then run the installer.
elevate.ps1 POWERSHELL
Copy Start -Process powershell -Verb RunAs
# in the new window:
.\setup.exe /quiet🎯 Key Takeaway
Approve UAC first.
Check folder permissions See who can write to the folder from the log.
icacls "C:\Windows\Temp"
icacls "C:\Program Files\ReportTool" 🎯 Key Takeaway
Know the ACL.
Check if a window is elevated Confirm you have the admin token.
([Security .Principal .WindowsPrincipal ][Security .Principal .WindowsIdentity ]::GetCurrent ()).IsInRole ([Security .Principal .WindowsBuiltInRole ]::Administrator ) 🎯 Key Takeaway
Elevated or not.
● Production incident POST-MORTEM severity: high
Admin, But Not Elevated Symptom
Error 0x80070005: Access is denied. Could not write to C:\Program Files\ReportTool.
Assumption
Admins can write anywhere.
Root cause
The PowerShell window wasn't elevated, so setup ran with a standard token.
Fix
Ran setup from an elevated PowerShell.
Key lesson
Admin is not elevated. Read which path failed. Don't loosen Program Files permissions.
Production debug guide Work through these in order 4 entries
Symptom · 01
Installer failed with 0x80070005
→
Fix
Run it again as administrator.
Symptom · 02
Still fails elevated
→
Fix
Find the failing path in the setup log.
Symptom · 03
Path is a temp or app folder
→
Fix
Check permissions with icacls and reset if needed.
Symptom · 04
Path looks fine
→
Fix
Temporarily check antivirus or controlled folder access logs.
⚙ Quick Reference
3 commands from this guide
File Command / Code Purpose elevate.ps1 Start-Process powershell -Verb RunAs Run elevated acl.ps1 icacls "C:\Windows\Temp" Check folder permissions check.ps1 ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetC... Check if a window is elevated
Key takeaways 3 Fix permissions, don't loosen them.
Common mistakes to avoid 3 patterns × Giving Everyone full control of Program Files Symptom
Security hole.
Fix
Run elevated instead.
× Assuming admin = elevated Symptom
Same error again.
Fix
Approve UAC: Run as administrator.
× Ignoring the setup log Symptom
Guessing the cause.
Fix
Read which path was denied.
INTERVIEW PREP · PRACTICE MODE
Interview Questions on This Topic
Practice
List View
Q01 JUNIOR
What does 0x80070005 mean?
Q02 SENIOR
Why can an admin get access denied?
Q01 of 02 JUNIOR
What does 0x80070005 mean?
ANSWER
E_ACCESSDENIED: Windows refused access to a file, folder or registry key.
Q02 of 02 SENIOR
Why can an admin get access denied?
ANSWER
UAC runs admins with a filtered standard token until they elevate.
01
What does 0x80070005 mean?
JUNIOR 02
Why can an admin get access denied?
SENIOR
FAQ · 3 QUESTIONS
Frequently Asked Questions
01
How do I fix 0x80070005 when installing? Run the installer as administrator. If it still fails, check the folder permissions and antivirus.
Was this helpful? 👍 Yes 👎 No
02
Does 0x80070005 mean a virus? No. It means access was denied; antivirus can be one cause.
Was this helpful? 👍 Yes 👎 No
03
Is it the same for Windows Update? Same code, same meaning; there it's often a permissions problem on system folders.
Was this helpful? 👍 Yes 👎 No
N
Naren
Founder & Principal Engineer
20+ years shipping production infrastructure and CI/CD at scale. Lessons pulled from things that broke in production.
Follow
✓ Verified
production tested
December 04, 2026
last updated
2,144
articles · all by Naren
🔥
That's Platform. Mark it forged?
3 min read · try the examples if you haven't
✓ Mark as read
Save for later