Fix "Access to the Registry Key Is Denied
In this article
When Windows throws an "Access to the registry key is denied" error, it usually means your user account lacks the necessary permissions to read or modify that specific registry key. The quickest fix is to take ownership of the key and grant your account full control, then retry your action. Below is a step-by-step guide that works for most Windows 10 and 11 systems.
What You'll Need
- An account with administrator privileges (you'll need to approve UAC prompts).
- The exact registry key path that's causing the error (you can copy it from the error message or from the program you're troubleshooting).
- Basic comfort with the Registry Editor — you'll only be changing permissions, not deleting or editing values.
Step-by-Step
- Back up the registry (optional but recommended). Open Registry Editor (press Win + R, type
regedit, press Enter). Go to File > Export, choose a location, and save a backup of the entire registry or just the key you're about to modify. This ensures you can restore if something goes wrong. - Navigate to the problem key. In Registry Editor, use the left pane to drill down to the key that's causing the error. If you don't know the exact path, you can use Edit > Find (Ctrl+F) to search for part of the key name, but be careful — searching can be slow.
- Right-click the key and select Permissions. This opens the permissions dialog for that specific key.
- Click Advanced. At the bottom of the Permissions window, you'll see an Advanced button. Click it to open the advanced security settings.
- Change the owner. At the top of the Advanced Security Settings window, you'll see the current owner (often TrustedInstaller or SYSTEM). Click Change next to it.
- Enter your username. In the "Enter the object name to select" box, type your Windows username (e.g.,
YourName). If you're not sure, click Advanced > Find Now and pick your account from the list. Click OK. - Check the "Replace owner on subcontainers and objects" box. This ensures the ownership change applies to all subkeys, which is often necessary to fully resolve the error.
- Click OK to close the Advanced window. Windows may take a few seconds to apply the ownership change.
- Grant yourself full control. Back in the Permissions window, select your username in the "Group or user names" list. If it's not there, click Add and add your account. Then check the Full Control box under "Allow".
- Click OK and close Registry Editor. Try the operation that originally failed (e.g., running a program, changing a setting, or installing an update). The error should no longer appear.
Common Mistakes
- Not replacing the owner on subkeys. If you only change the owner of the top-level key, subkeys may still be inaccessible. Always tick the "Replace owner" checkbox.
- Using the wrong account name. If you type your Microsoft account email instead of the local username, Windows may not recognize it. Use the exact local account name (check Settings > Accounts).
- Granting permissions to the wrong group. Adding "Everyone" is a security risk and often not necessary. Stick to your specific user account.
- Skipping the backup. Registry changes are risky. If you corrupt a key, you could break Windows. Always export a backup first.
Tips
- If you're on a work or school computer, the error might be due to group policy. Contact your IT administrator instead of modifying permissions yourself.
- For keys owned by TrustedInstaller, you may need to take ownership twice — first to your account, then back to TrustedInstaller after you're done, to keep the system secure.
- If the error occurs only for a specific application, try running that application as an administrator (right-click > Run as administrator) — sometimes that's enough.
- Use the 64-bit Registry Editor if you're on 64-bit Windows. The 32-bit version might show a different view of the registry (WOW6432Node), which can cause confusion.
Troubleshooting
If you've followed the steps and the error persists, try these in order:
- Restart your computer. Permission changes sometimes need a reboot to take full effect.
- Check for hidden subkeys. Some keys have child keys that inherit permissions from a parent key. Ensure you've applied the change to the correct level — you might need to repeat the process on a parent key.
- Use the command line. Open Command Prompt as administrator and use the
takeownandicaclscommands. For example, to take ownership of a key (replaceHKEY_LOCAL_MACHINE\SOFTWARE\MyKeywith your path):
takeown /f "HKEY_LOCAL_MACHINE\SOFTWARE\MyKey" /r /d y
thenicacls "HKEY_LOCAL_MACHINE\SOFTWARE\MyKey" /grant "%USERNAME%":(F) /t - Check if antivirus or security software is blocking. Temporarily disable your third-party antivirus and try again. If it works, add an exception for the program you're running.
- Create a new administrator account. If the issue is tied to your profile, create a new local admin account and test. If the error disappears, it's a profile corruption issue.
- Run System File Checker. Open Command Prompt as administrator and run
sfc /scannow. This checks for corrupted system files that might be interfering with registry access.
Frequently Asked Questions
Why do I get this error even though I'm an administrator?
Being an administrator doesn't automatically grant full control over every registry key. Many system keys are owned by TrustedInstaller or SYSTEM, and you need to explicitly take ownership and set permissions.
Is it safe to take ownership of registry keys?
It's generally safe if you only modify the specific key that's causing the problem and don't delete or change values. Always back up first. Avoid taking ownership of entire root keys like HKLM — that can destabilize Windows.
Can I fix this without touching the registry?
Sometimes. If the error comes from a specific program, try reinstalling that program or running it as administrator. Also check if the program has its own repair option in Settings > Apps.
What if I can't even open Registry Editor?
If you get the error when trying to open regedit itself, your account may be restricted. Try booting into Safe Mode (Shift + Restart from the login screen) and then attempt the steps.
Will this fix the error permanently?
Usually yes, for that specific key. However, if the program later tries to access a different key with similar restrictions, you may need to repeat the process for that key.
Do I need to restart after changing permissions?
Not always, but restarting can help ensure the changes are fully applied, especially if the key is in use by a system service.