How To Change Permissions Of A Registry Key
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. However, the following error messages may arise if you 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 need to give your user account full permissions – to edit, delete or create entries for that key. You will also see an error 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 – as shown below:
If you try to create a new entry for a protected key you see an error like this:
If you really do need to edit a protected key (or create a new one) in order to fix something, follow these steps.
How To Change Registry Permissions
Be very careful when editing the registry – create a system restore point first and/or take a backup e.g. with the Tweaking.com registry backup utility. In our examples below we will change permissions for the InprocServer32 key [which can be necessary to fix “Can’t Find Script Engine” errors when running VBScript.]
1. Open the Registry Editor:
- XP – click Start \ Run and type regedit into the Run box then press OK
- Vista/7 – click Start and type regedit into the Search box then press OK
2. Browse to the protected key and right click it – select Permissions to open the Permissions window:
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 (our example is ‘Me’) from the list under ‘Change owner to’ and press Apply:
[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:
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 below) then press OK:
7. Now, back on the ‘Advanced Security Settings’ window, you should see your username listed with a Permission of Full Control:
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.
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.