This guide addresses the Windows IIS (Internet Information Services) installation error 0x80070005, which typically indicates an access denied problem. You’ll learn how to identify the specific cause and apply targeted fixes to successfully install IIS on your Windows machine.
What You’ll Need
- Administrator account on the Windows machine
- Access to Command Prompt or PowerShell (run as administrator)
- Stable internet connection (if using Windows Update)
- Patience to follow steps in order
Step-by-Step
- Verify the exact error code. The error 0x80070005 is a generic “Access Denied” error. However, the full error message often includes more details, such as a specific component or log file. Note the complete text before proceeding.
- Run Windows Update Troubleshooter. Open Settings > Update & Security > Troubleshoot > Additional troubleshooters. Select “Windows Update” and run the troubleshooter. This can fix underlying update service issues that often cause IIS installation failures.
- Reset Windows Update components. Open Command Prompt as administrator. Stop the relevant services by typing the following commands one by one, pressing Enter after each:
net stop wuauserv
net stop cryptSvc
net stop bits
net stop msiserver
Then rename the SoftwareDistribution and catroot2 folders:
ren C:\Windows\SoftwareDistribution SoftwareDistribution.old
ren C:\Windows\System32\catroot2 catroot2.old
Restart the services:
net start wuauserv
net start cryptSvc
net start bits
net start msiserver
Try installing IIS again. - Check and fix file/folder permissions. The error often occurs because the installer cannot write to certain directories. Right-click on the
C:\Windows\System32\inetsrvfolder (if it exists) and select Properties > Security. Ensure the “SYSTEM” account has Full Control. If not, click Edit, add SYSTEM, and grant Full Control. Also checkC:\Windows\System32\configandC:\Windows\System32\LogFilesfor similar permission issues. - Run DISM and SFC scans. In the same administrator Command Prompt, run:
DISM /Online /Cleanup-Image /RestoreHealth
After it completes (may take 10-15 minutes), run:
sfc /scannow
Restart your computer and try the IIS installation again. - Enable IIS via Windows Features with elevated privileges. Sometimes the GUI fails silently. Open PowerShell as administrator and run:
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole -All
This command directly enables IIS and all its sub-features. If it returns an error, read the detailed message; it may point to a specific missing component. - Check Group Policy settings. If you’re on a domain, Group Policy might restrict software installation. Run
gpresult /h gp.htmlin Command Prompt to export the policy results, then open the HTML file and look under “Computer Configuration” > “Software Installation” for any restrictions. If you find a restrictive policy, contact your system administrator. - Perform a clean boot. Type
msconfigin the Run dialog (Win+R). Under the Services tab, check “Hide all Microsoft services” then click “Disable all”. Under the Startup tab, open Task Manager and disable all startup items. Restart and attempt the IIS installation. This eliminates third-party software conflicts.
Common Mistakes
- Skipping the exact error readout: 0x80070005 is just the starting point. The full error often includes the failing component (e.g., “IIS-WebServerRole”). Ignoring that detail leads to generic fixes that don’t apply.
- Not running as administrator: Even if your account is an administrator, you must explicitly right-click and choose “Run as administrator” for Command Prompt or PowerShell. The elevation prompt is essential.
- Renaming catroot2 without stopping services: If you rename the catroot2 folder while Cryptographic Services is running, you’ll get a sharing violation error. Always stop the services first.
- Forgetting to restart after DISM/SFC: These scans make changes that require a restart to take effect. Trying to install IIS immediately after may still fail.
Tips
- Use the
Enable-WindowsOptionalFeaturePowerShell command as your primary method—it’s more reliable than the GUI for IIS. - If you only need basic web hosting, you don’t need all IIS sub-features. Install just
IIS-WebServerRoleandIIS-ManagementConsoleto reduce the chance of errors. - Keep your Windows OS updated. Many IIS installation bugs are fixed in cumulative updates.
- Create a system restore point before making changes to system folders or services. This allows you to revert if something goes wrong.
Troubleshooting
If the steps above don’t resolve the issue:
- Check the CBS log: After a failed installation, open
C:\Windows\Logs\CBS\CBS.login a text editor. Search for “0x80070005” to find the exact file or registry key that failed. The log will show a path like “Access denied: C:\Windows\…”—fix permissions on that specific item. - Try installing via DISM: Use
DISM /Online /Enable-Feature /FeatureName:IIS-WebServerRole /Allin an elevated Command Prompt. This sometimes bypasses issues with the Windows Update service. - Disable antivirus temporarily: Some security software interferes with system file changes. Disable real-time protection temporarily and try again. Re-enable it immediately after.
- Check for pending Windows updates: If there are pending updates, install them first. A partially updated system can cause access errors.
- Use the Windows Media Creation Tool to repair: If all else fails, create a Windows installation USB and run setup from within Windows, choosing “Keep personal files and apps”. This repairs the OS without losing data.
Frequently Asked Questions
What exactly does error 0x80070005 mean?
It’s a Windows error code that translates to “Access is denied.” In the context of IIS installation, it means the installer couldn’t write to a required file or registry key due to insufficient permissions.
Do I need to be an administrator to fix this?
Yes, you must have administrative privileges. Even with admin rights, you need to explicitly run the Command Prompt or PowerShell as administrator (right-click > Run as administrator).
Will this error affect my existing websites if I already have IIS partially installed?
If IIS is partially installed, it might not work correctly. The steps in this guide will repair the installation, but existing sites may need to be reconfigured after a successful fix.
Can I install IIS on Windows 10 Home?
Yes, IIS is available on Windows 10 Home. The same error and fixes apply. However, some advanced features like FTP are not available on Home edition.
Why does the DISM command take so long?
DISM checks and repairs the Windows image, which involves scanning thousands of files. It can take 10-20 minutes depending on your system speed and disk health. It’s normal for it to appear stuck at 20% for a while.
Is there a way to avoid this error in the future?
Keep Windows Update current, avoid manually changing permissions on system folders, and always install IIS using the official Windows Features dialog or PowerShell command. Also, create a restore point before major system changes.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Gmail Notifications Not Working? Fixes That Work
- Fix Thumbnails Not Showing on Network Drives in Windows 11
- Stop Skype Auto-Start in Windows: 5 Fixes
- SQL Injection Prevention: Step-by-Step Guide
- Fix Windows PowerShell Popping Up
- Print iMessage or Text Conversations on iPhone & iPad