ERROR HRESULT
0x80070005
E_ACCESSDENIED — the calling process doesn't have permission
in plain english
Win32 facility-7 (Win32 errors) error 5 — ACCESS_DENIED — wrapped in HRESULT form. The thread doesn't have rights to do what it tried to do: open a file, write to a registry key, modify a service, call an API, anything. UAC, ACL, or token elevation is the usual cause.
most likely causes
- UAC: process needs to run elevated and isn't (Run as administrator)
- DACL on the target file/folder/registry key denies the user's SID
- Endpoint protection or Defender ASR rule blocking the action
- Service account lacks the right ('Log on as a service', 'Replace process-level token', etc.)
- GPO 'User Rights Assignment' has revoked the privilege the action needs
fix path
- Re-run the action elevated (right-click → Run as administrator)
- Inspect effective permissions: Get-Acl <path> | Format-List, or icacls <path>
- Check Defender ASR rules: Get-MpPreference | Select AttackSurfaceReductionRules_Ids
- If a service: confirm the service account has the required user right (secpol.msc → Local Policies → User Rights Assignment)
- Event Viewer → Security → audit-failure events around the time of the error often name the exact missing right
seen in
Win32 file/registry/service operations · PowerShell module loading · MSI installs · Group Policy processing
related
verified