How To Change Permissions Of A Registry Key

You may need to change the permissions of a registry key to be able to edit it or create a new value.

The Windows registry contains some important keys which are protected by the system so that you can’t edit them or create new entries.

This is good for security as it protects them from tampering or incorrect changes which might seriously mess up Windows – be wary of trying to change such keys.

Error Messages When Editing Registry Keys

Error messages may arise if you do try to change a protected registry key – because your user account does not have the necessary permissions to modify it.

To bypass the protection you will need to give your user account full permissions – to edit, delete or create entries for that key.

You will see an error message if you try to import new registry entries from a .reg file into a protected key. Likewise, if you try to edit a value of a protected key – you will get the ‘Error Editing Value’ regedit error message as shown below:

'Error Editing Value' regedit error message

Or, if you try to create a new entry for a protected key you see a regedit ‘Error Creating Key’ error message like this:

regedit 'Error Creating Key' error message

If you really do need to edit a protected key (or create a new one) in order to fix something, follow these steps to give your user account the necessary permissions.

How To Change Registry Permissions

Be careful when editing the registry – create a system restore point first and/or take a registry backup e.g. with the Tweaking.com registry backup utility.

In the examples below I will change the user account permissions for the InprocServer32 registry key [which is necessary to fix ‘Can’t Find Script Engine’ errors when running VBScript]

1. Open the Registry Editor:

  • Windows 10, 8, 7 and Vista – click Start and type regedit into the Search box then select the regedit program (if prompted, click Yes to allow the program to run)
  • XP – click Start \ Run and type regedit into the Run box then press OK

2. Browse to the protected key and right click it – select Permissions to open the Permissions window as in the example below:

registry key permissions

3. In the Permissions window – press the Advanced button to open the ‘Advanced Security Settings’ window

4. Select the ‘Owner’ tab and make a note of the current owner. Now tick the box ‘Replace owner on subcontainers and objects’ then select your username (‘Me’ in the example below) from the list under ‘Change owner to’ and press Apply:

replace owner on registry key

[If your username is not listed, press the ‘Other users or groups’ button then type your username into the input box and press OK to add it to the list]

Your username should now be listed as the ‘Current owner’.

5. Select the ‘Permissions’ tab and press the ‘Add’ button then type your username into the input box and press OK:

select new user in regedit

6. In the Permission Entry window for your username, tick the ‘Allow Full Control’ box (it will automatically tick all the other Allow boxes as shown below) then press OK:

change permission to Allow Full Control

7. Now, back on the ‘Advanced Security Settings’ window, you should now see your username listed with a Permission of Full Control:

regedit edit key permissions

8. Click OK twice to close the windows and return to the registry editor.

Now you have the correct permissions, you should be able to edit the values of the protected key or create new entries within it.

Important Security

After you have finished editing the protected key, for best security you should always reset the permissions back to how they were before.

To do this, follow steps 1 and 2 then (in the Permissions window) select your username and press the Remove button then press Apply.

Then press the ‘Advanced’ button to open the Advanced Security Settings window.

Select the ‘Owner’ tab and tick the box ‘Replace owner on subcontainers and objects’ then select the original owner username (that you noted in Step 4 earlier) from the list under ‘Change owner to’ – press Apply to re-assign it as the owner.

Click OK twice to close the windows and return to the registry editor.