Access to the Registry Key Denied: How to Fix Permissions of a Registry Key

Sometimes, when you are trying to delete or rename a registry key, you get access denied error. It is usually caused either by poorly written software which created another user account on your PC and failed to clean up properly on deinstallation, or by transferring registry hive from another PC. Anyway, this is due to registry key permissions stored in ACLs (access control lists).

Emergency Boot CD contains offline Registry Editor, which operates at low level and can directly manupulate ACLs in the registry keys. This article explains step by step, how to fix access denied error in registry, take ownership of a registry key, and fix permissions of a registry key.

Contents

1. Symptoms of the problem

There's a key in registry which can't be renamed or deleted. Sometimes such a key even can't be read:

Fix Access to the Registry Key Denied with EBCD - Protected Key in Regedit
Fix Access to the Registry Key Denied with EBCD - Protected Key in Regedit

Failed attempt to rename registry key:

Fix Access to the Registry Key Denied with EBCD - Key can't be renamed in Regedit
Fix Access to the Registry Key Denied with EBCD - Key can't be renamed in Regedit

Failed attempt to delete registry key:

Fix Access to the Registry Key Denied with EBCD - Undeleteable Key in Registry, Screen 1
Fix Access to the Registry Key Denied with EBCD - Undeleteable Key in Registry, Screen 1
Fix Access to the Registry Key Denied with EBCD - Undeleteable Key in Registry, Screen 2
Fix Access to the Registry Key Denied with EBCD - Undeleteable Key in Registry, Screen 2

2. How to fix Access to the Registry Key Denied error

In order to make registry key readable and writeable in Windows, we must copy security descriptor from some other key (for example, root key of registry hive) to target key. This way ACL (access control list) of users who have key access permissions will be made equal for both keys.

Emergency Boot CD is a powerful toolset to fix unbootable computers and recover data from them. One of EBCD tools is an offline Registry Editor, which can make changes to the Windows Registry from the outside of Windows.

Security descriptors of registry keys can be read and written by EBCD Offline Registry Editor in raw mode. Security descriptors are not parsed by EBCD (they are just opaque sequences of bytes), but nevertheless they can be freely copied between keys and hives.

Using EBCD Registry Editor in raw mode, you'll be able to copy ACLs from "known good" registry key to "known bad" registry key.

3. Step by step guide of using EBCD to fix permissions of a registry key

1) Download EBCD and burn it to CD/DVD according to the instructions, then set up your BIOS to boot from CD. You need full EBCD version to actually write changes to the disk, but it's recommended to try demo version first to make sure  there are no hardware incompatibilities.

2) Boot from EBCD, wait until the main menu appears.
Choose "Registry Editor" in the main menu or press F4

Fix Access to the Registry Key Denied with EBCD - Main Menu
Fix Access to the Registry Key Denied with EBCD - Main Menu

3) Wait while EBCD scans all local disks for Windows installations

Fix Access to the Registry Key Denied with EBCD - Wait for Scan
Fix Access to the Registry Key Denied with EBCD - Wait for Scan

4) Choose your Windows installation from the list
    (you may ignore "Boot Partition" which is sometimes shown if Windows 7 is installed).
    Use your mouse or UP, DOWN and ENTER keys on the keyboard to make a choice.

Fix Access to the Registry Key Denied with EBCD - Choose Windows installation
Fix Access to the Registry Key Denied with EBCD - Choose Windows installation

5) Choose Registry Hive you want to edit.
    Use your mouse or UP, DOWN and ENTER keys on the keyboard to make a choice.

Fix Access to the Registry Key Denied with EBCD - Choose Registry Hive to edit
Fix Access to the Registry Key Denied with EBCD - Choose Registry Hive to edit

6) EBCD Registry Editor appears, as shown below:

Fix Access to the Registry Key Denied with EBCD - EBCD registry editor
Fix Access to the Registry Key Denied with EBCD - EBCD registry editor

7) Navigate to the source registry key which is readable in Windows (a donor of security descriptor). Root key of the hive will be used in this example. If you need to use another registry key as SD donor, then use UP, DOWN and ENTER keys on the keyboard.

Fix Access to the Registry Key Denied with EBCD - HKEY_CURRENT_USER\Software
Fix Access to the Registry Key Denied with EBCD - HKEY_CURRENT_USER\Software

8) Press F9 to enter Raw mode. Security descriptor will appear on the right panel. Press TAB to switch input focus to the right panel:

Fix Access to the Registry Key Denied with EBCD - HKEY_CURRENT_USER\Software\Microsoft
Fix Access to the Registry Key Denied with EBCD - HKEY_CURRENT_USER\Software\Microsoft

9) Using UP and DOWN arrow keys navigate to "Key Security", hold SHIFT key and select security descriptor with UP and DOWN arrow keys:

Fix Access to the Registry Key Denied with EBCD - HKEY_CURRENT_USER\Software\Microsoft\Windows
Fix Access to the Registry Key Denied with EBCD - HKEY_CURRENT_USER\Software\Microsoft\Windows

10) Press Ctrl+C to copy security descriptor into the clipboard and then TAB to switch input focus back to the left panel:

Fix Access to the Registry Key Denied with EBCD - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion
Fix Access to the Registry Key Denied with EBCD - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion

11) Navigate to the target registry key which is unreadable/unwriteable in Windows (an acceptor of security descriptor). Use your mouse or UP, DOWN and ENTER keys on the keyboard to make a choice. Then press TAB key to switch input focus to the right panel and navigate to "Key Security" using UP and DOWN keys:

Fix Access to the Registry Key Denied with EBCD - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies
Fix Access to the Registry Key Denied with EBCD - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies

12) Press Ctrl+V to paste (overwrite) security descriptor of the target registry key:

Fix Access to the Registry Key Denied with EBCD - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System
Fix Access to the Registry Key Denied with EBCD - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System

13) Press F2 to save changes to the registry hive on disk:

Fix Access to the Registry Key Denied with EBCD - Registry editor changing value
Fix Access to the Registry Key Denied with EBCD - Registry editor changing value

14) Finally, in the main menu of EBCD, choose "Reboot" or press F10:

Fix Access to the Registry Key Denied with EBCD - Done
Fix Access to the Registry Key Denied with EBCD - Done