I guess this is your typical newbie mistake on Windows Vista, but even so I had a hard time finding the solution on Google so I thought I’d post about it.
When I was trying to add a key in the Registry Editor, regedit.exe, I got an error message saying “Cannot create value: Error writing to the registry.”
I have never seen this on XP (but then again I don’t edit the registry that often), but since this is Vista with UAC (User Account Control) I thought it might have to do with permissions so I tried to run regedit.exe as Administrator but to no avail.
Finally I figured out that I did not have the right permissions in the registry tree.
The solution is simply to right click on the folder and select Permissions. You may not even have the right to change the permissions, if this is the case then first you have to take ownership – click Advanced and then the Owner tab.
Funny thing about my folder is that the owner was a group called “TrustedInstaller”. After I had taken ownership, I wanted to change it back to the “TrustedInstaller” group but it was nowhere to be found. Apparently you can’t change it back – it is not a group but a service and part of Windows Resource Protection (WRP) as noted by Richard Civil and others in this TechNet post.
Two other useful newbie things I found out – thanks to this post by Tim Sneath of Microsoft – when trying to figure out how to run a regedit.exe as Administrator in Vista was this:
- Run from the XP Start menu is now replaced with Start Search bar in Vista. Simply type regedit.exe (or cmd.exe etc.) in the search bar and hit Enter and it will run.
- To run an application with Administrator privileges using this method, instead of hitting Enter you hit Ctrl+Shift+Enter.