The Windows registry is a hassle to edit under normal circumstances, but sometimes you’ll encounter keys that are protected by the system. When you try to edit a protected registry key, you’ll run into a few different errors, but they tell you that you lack permissions for making changes. However, since it is just a permissions issue we can get around this by granting your user account in Windows the correct permissions! Read on to learn how.
How do I know the registry key is protected?
When trying to create a new entry within a protected Key you’ll see the following error:
Error Creating Key
Cannot create key: You do not have the requisite permissions to create a new key under <registry key name>.
When you try to edit an entry, you’ll see this error:
Error Editing Value:
Cannot edit <entryname>: Error writing the value’s new contents.
When you are working with a premade .reg file, it won’t work. If you run a .reg file to import new registry entries, you’ll encounter the following error:
Cannot import <folder\file.reg>: Not all data was successfully written to the registry. Some keys are open by the system or other processes.
How To Take Ownership & Full Control Of The Registry
If you are encountering the above errors, without a doubt, you’ve encountered a protected registry key. Normally these keys are only open to modification by the System, but if you follow the steps below, you’ll learn how to make your user account a powerful registry editing demi-god. Open up regedit and let’s get started!
In regedit (Registry Editor) Right-Click the protected key in question. From the context menu that appears, Select Permissions.
Tip: If you want, you could take control of the top tree of the registry. In effect, you would have full control of the entire registry. However, this is not recommended for security purposes unless you plan on removing said permissions when you finish working.
In the Permissions window that appears, Click Advanced.
Click the Owner tab and Select your username from the list.* Now Check the Replace owner box and Click Apply. (Yes! This is one of the few instances where the Apply button is actually useful!)
*If your username is not on this list Click Other users or groups and manually add it.
Click the Permissions tab and then the Add button. In the Select User window Type your username into the white box and Press OK.
A new Permission Entry window should pop-up; just Check the Allow Full Control box and Click OK.
Back on the previous window, your username should be on the list with Permissions set to Full Control. Now all that is left to do is to save and exit all open windows by Clicking OK a couple of times.
You should now be able to edit any of the entries within the registry key that you just modified permissions for. Don’t forget that if you want to maintain proper security protocol, after finishing you can go back in and Remove your user from the list of names with Full Control. Have a groovy time editing the registry without restriction!