you will run into a Registry key or value that you don’t have permission to edit. When you try, you’ll see an error message saying “Cannot edit _____: Error writing the value’s new contents.” Fortunately, just like in the Windows file system, the Registry provides tools that let you take ownership of and edit Edit Protected Registry Keys. Here’s how to do it.
Registry Editor is a powerful tool and misusing it can render your system unstable or even inoperable. So there’s a reason some of these Registry keys are protected. Editing a protected key can sometimes mess up Windows or the app the key relates to. I will never point you to any hacks that I haven’t tested myself, but it still pays to be careful.
In Registry Editor, right-click the key that you can’t edit (or the key that contains the value you can’t edit) and then choose “Permissions” from the context menu.
In the Permissions window that appears, click the “Advanced” button.
Next, you’re going to take ownership of the Registry key. In the “Advanced Security Settings” window, next to the listed Owner, click the “Change” link.
In the “Select User or Group” window, in the “Enter the object name to select” box, type the name of your Windows user account (or your email address if you have a Microsoft account) and then click the “Check Names” button to validate the account name. When that’s done, click OK to close the “Select User or Group” window and then click OK again to close the “Advanced Security Settings” window.
Back at the regular Permissions window, select the Users group and then choose the “Allow” check box next to the “Full Control” permission. If you prefer, you can just give your user account full permissions rather than the Users group. To do that, click the Add button, walk through the steps to add your user account to the list, and then give that account the Full Control permission. Whichever method you choose, click OK when you’re done to return to Registry Editor.
Back in Registry Editor, you should now be able to Edit Protected Registry Keys you’ve taken ownership of and given yourself full permissions to modify.