The infamous 0x80070005 code universally translates to "Access Denied." Even when logged in as "Administrator," Windows restricts access to critical system folders (like `WindowsApps` or the `System32` directory) by assigning ownership to an invisible master account called "TrustedInstaller."
1. The NTFS Inheritance Tree
Windows permissions flow downward. If you restrict access at the folder level, all files inside inherit that restriction. When permission trees get corrupted by bad software uninstallers or malware attempting to hide, legitimate applications suddenly get "Access Denied" errors when trying to read their own configuration files.
2. The GUI Method: Taking Ownership
To modify a file locked by TrustedInstaller:
- Right-click the folder -> Properties -> Security Tab -> Advanced.
- At the top next to "Owner", click Change.
- Type your Windows username or exactly `Administrators` (with the 's') and click Check Names, then OK.
- Check the box that says "Replace owner on subcontainers and objects". Click Apply.
- Now close the box, re-open properties, and grant your user "Full Control".
3. The Command-Line Master Approach: TAKEOWN & ICACLS
When the GUI method fails or you need to bulk-process an entire corrupted game drive, use elevated command prompt tools. These bypass GUI restrictions entirely.
Claiming Ownership:
takeown /F "D:\LockedFolder" /A /R /D YThis forces the Administrators group (`/A`) to forcefully take ownership of the folder and recursively (`/R`) all files inside it without prompting (`/D Y`).
Granting Full Control:
icacls "D:\LockedFolder\*.*" /grant Administrators:F /TThis command rewrites the Access Control List (ACL), granting the Administrators group Full (`F`) control recursively (`/T`).
4. Hidden "Access Denied" Vectors: Controlled Folder Access
Since Windows 10, Windows Security includes a ransomware protection feature called "Controlled Folder Access". If your game cannot save, or an installer throws an Access Denied error on your Documents folder, type "Ransomware Protection" into the Start menu. Often, this feature is silently blocking unknown executables from writing to your user directories. You must click "Allow an app through Controlled folder access" to fix it.