Regedit – Cannot create value: Error writing to the registry.
Feb 23
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.

Mar 26, 2007 @ 09:10:00
Thank you very much for the explanation. It was very useful.
May 22, 2007 @ 14:02:00
Hello there, i did everything in the tut, but im still having the same error appearing, the registry path is
HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\Scsi\
It works in most other paths, just not this one
Im using Vista Ultimate
Help would be appreciated!
Thanks
Xp10r3r_3X
Jul 12, 2007 @ 19:03:00
Thanks for the bit about restarting Outlook after setting securities on Macros. I guess I’m so used to Outlook telling me when it needs to restart that it didn’t occur to me there would be a case where it wouldn’t tell me.
Jan 02, 2008 @ 22:50:00
This was very useful. I appreciate your time writing this up, saved me some headache.
Aug 20, 2008 @ 12:23:00
This was vey helpful indeed. Thanks to you!
Jan 07, 2009 @ 05:10:00
This is great. I really appreciate the help provided in this blog.
May 01, 2009 @ 21:36:18
You can actually change the owner back to “TrustedInstaller”. Simply follow the below mentioned steps:
a. Right-click on the registry and choose permissions
b. Click Security tab
c. Click Advanced button
d. Click Owner tab
e. Click Edit button
f. Click on Location and choose local machine name.
g. Click Other User or Group and type in:
h. NT SERVICE\TrustedInstaller
i. Click Apply and you are done!!!!!!
May 14, 2009 @ 15:09:24
Great post – thank you! Saved me hours, I’m sure.
Jun 23, 2009 @ 08:06:48
hi devendra i tried your trick but after editing the ownership it says cannot save to the explorer retry .. please mail me about this problem
Aug 12, 2010 @ 18:24:16
lol
Tks for the solution, i was having the same newbie problem
=]
Aug 18, 2010 @ 19:35:34
Thank you! I wanted to get through the XP OOBE Activation in XP Mode, and I tried the registry trick, which only hid OOBE, I still had to activate. To get the Activ. to work, I had to change the Binary Key. It didn’t allow me. This works! Thanks!
Aug 08, 2011 @ 18:57:27
Just wanted to thank you! You saved me a lot of time and disappointment.
May 03, 2012 @ 11:01:08
Thanks alot !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!