Friday, February 23, 2007

Regedit - Cannot create value: Error writing to the registry.

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:

  1. 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.
  2. To run an application with Administrator privileges using this method, instead of hitting Enter you hit Ctrl+Shift+Enter.

Labels:

5 Comments:

Anonymous Anonymous said...

Thank you very much for the explanation. It was very useful.

Mon Mar 26, 10:10:00 AM CEST  
Anonymous xplorer_ex said...

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

Tue May 22, 03:02:00 PM CEST  
Anonymous Anonymous said...

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.

Thu Jul 12, 08:03:00 PM CEST  
Anonymous Anonymous said...

This was very useful. I appreciate your time writing this up, saved me some headache.

Wed Jan 02, 10:50:00 PM CET  
Anonymous Anonymous said...

This was vey helpful indeed. Thanks to you!

Wed Aug 20, 01:23:00 PM CEST  

Post a Comment

Links to this post:

Create a Link

<< Home