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
Before you start⏱ 6 min
  • ✓Windows basics
 ● Production Incident 🔎 Debug Guide
⚡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.ps1POWERSHELL
1
2
3
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.

acl.ps1POWERSHELL
1
2
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.

check.ps1POWERSHELL
1
([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
Output
True
🎯 Key Takeaway
Elevated or not.
● Production incidentPOST-MORTEMseverity: 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 guideWork through these in order4 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
FileCommand / CodePurpose
elevate.ps1Start-Process powershell -Verb RunAsRun elevated
acl.ps1icacls "C:\Windows\Temp"Check folder permissions
check.ps1([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetC...Check if a window is elevated

Key takeaways

1
Admin isn't elevated.
2
Read the failing path.
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

Q01JUNIOR
What does 0x80070005 mean?
Q02SENIOR
Why can an admin get access denied?
Q01 of 02JUNIOR

What does 0x80070005 mean?

ANSWER
E_ACCESSDENIED: Windows refused access to a file, folder or registry key.
FAQ · 3 QUESTIONS

Frequently Asked Questions

01
How do I fix 0x80070005 when installing?
02
Does 0x80070005 mean a virus?
03
Is it the same for Windows Update?
RESOURCES

Keep going

AutoSys Full Course for Beginners▶
WatchAutoSys Full Course for BeginnersJIL, job statuses, monitoring and failed jobs, start to finish.Watch on YouTube →
ReadThe complete DevOps guideOne deep guide that walks the whole DevOps track in order.Start reading →
Q
PracticeDevOps Interview QuestionsReal interview questions with answers, by topic.Practice now →
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

←
Previous
AutoSys Job Permission Denied: Job Owner
8 / 8 · Platform