How to Fix System Error 5 Has Occurred Access Is Denied Problem on Windows

If you ever try to run a command or open a program in Windows and see the message “System error 5 has occurred. Access is denied,” it usually means you’re missing administrator rights. This problem can appear in Command Prompt, PowerShell, or even when you try to install or run certain apps.
The good news is that this error is easy to fix. Here’s how to get rid of it.
Why This Error Happens
Windows protects some system areas so that only administrators can make changes. When you try to run a command or program that needs those higher privileges but you’re using a normal user window, Windows blocks it and shows this error.
In some cases, other issues can also trigger it:
- Your computer’s clock or date is out of sync.
- The account you’re using doesn’t have permission to access a remote device.
- The user account is disabled or doesn’t exist.
- A firewall or security program is blocking the connection.
But most of the time, it simply means you need to open the tool with administrator rights.
1. Run Command Prompt or PowerShell as Administrator
The simplest fix is to relaunch the tool with admin privileges.
Here’s how:
- Open the Start menu.
- Type Command Prompt or PowerShell in the search box.
- Right-click on it and choose Run as administrator.
- When the User Account Control (UAC) prompt appears, click Yes.
You’ll know it worked if the window title says Administrator: Command Prompt or Administrator: PowerShell. Now, try your command again — it should work without any issue.
2. Always Launch Command Prompt as Admin (Optional)
If you often run commands that need admin rights, you can make Windows open Command Prompt (or PowerShell) as administrator by default.
Steps:
- Open the Start menu, find Command Prompt, right-click it, and choose Open File Location.
- In the new window, right-click Command Prompt again and select Open File Location once more.
- Right-click on cmd.exe, then choose Show More Options > Send to > Desktop (create shortcut).
- Go to your desktop, right-click the new shortcut, and select Properties.
- Under the Shortcut tab, click Advanced, then check Run as administrator, and press OK.
From now on, whenever you use that shortcut, it’ll automatically open with admin privileges.
3. Run the App or Installer With Admin Rights
If the error appears while running or installing software, the fix is the same — just launch it as an administrator.
To do this:
- Right-click the app or setup file.
- Choose Run as administrator.
- Approve the UAC prompt by clicking Yes.
This lets the program make the necessary system changes.
4. Make Your User Account an Administrator
If you’re often blocked by permissions, you can change your account type to administrator.
You’ll find this option in Settings > Accounts > Other users (or Family & other users). Select your account and choose Change account type > Administrator.
After switching, you’ll have permanent admin privileges for all system actions.
5. Edit the “LocalAccountTokenFilterPolicy” Registry Key (Advanced)
If you’re trying to access another computer on a local network and still see the error, this registry tweak can help.
Steps:
- Press Windows + R, type
regedit, and press Enter. - Navigate to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System. - Look for an entry named LocalAccountTokenFilterPolicy.
- If it’s missing, right-click in the right panel, choose New > DWORD (32-bit) Value, and name it LocalAccountTokenFilterPolicy.
- Double-click it and set its Value data to
1. - Click OK and restart your computer.
This change adjusts how Windows handles permissions for remote connections and can fix lingering “Access denied” errors.
6. Check for Viruses or Corrupted Registry
Malware can sometimes damage system files or change registry settings, leading to permission problems.
Run a full virus scan using Windows Security or any trusted antivirus program.
If the registry is damaged, you can use a safe registry cleaner or the built-in System File Checker (SFC) tool:
- Open Command Prompt as admin.
- Type
sfc /scannowand press Enter. Windows will check for corrupted files and fix them automatically.
7. (Optional) Turn Off User Account Control Prompts
If the frequent UAC pop-ups bother you, you can lower or disable them:
- Open the Start menu and search UAC.
- Choose Change User Account Control settings.
- Move the slider down to “Never notify” to disable the prompt.
(Note: This reduces security, so only do it if you’re confident in what you’re running.)
Conclusion
The “System error 5 has occurred” message sounds serious, but it’s usually just a sign that Windows needs administrator permission to complete the task. Running Command Prompt, PowerShell, or your app as an admin almost always fixes it right away.
If it doesn’t, check for network, registry, or permission issues — but in most cases, this simple step will get your commands running smoothly again.



