Few days ago I was helping someone to solve their computer from Live Help and had to delete some suspected corrupted registry entries but wasn’t able to. If you didn’t know what a Windows registry is, it is a database that keeps settings for Windows computer. It contains a lot of settings for software, hardware and Windows user configurations. Editing Windows registry is dangerous if you don’t know what you’re doing because if you wrongly deleted an important key, your Windows computer might not be able to boot up the next time. So no matter how confident you are, always make a backup of the registry that you want to edit or delete using the Export option.
Like I was saying, I had problems deleting one of the registry key. When I hit the delete key, I was warned by a popup that says “Are you sure you want to permanently delete this key and all of its subkeys?” Once I clicked Yes, I got another error popup that says “Cannot delete XXXX: Error while deleting key.“.

So far I only knew that a limited user account cannot run the registry editor but never did I know that an administrator of the computer can also have registry restrictions. To solve this problem, we’ll have to edit the registry permissions to allow the logged on user full control on the subkeys.
First of all, you need to make sure that your account has administrative privileges and know what is the currently logged on user name that you want to use to edit the restricted registry. My simple way of telling that is from the Windows Task Manager. Simultaneously press Ctrl + Shift + Esc. Go to Processes tab and check the User Name column. You should see SYSTEM, LOCAL SERVICE, NETWORK SERVICE and your user name. As you can see, my user name is Raymond.

Now simply follow the steps below to take full control of the restricted registry key. Here is an EXAMPLE key that you cannot delete or modify without setting the permission first. I am sure there are more…
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_MCHINJDRV
1. Run Registry Editor by typing regedit at Run.
2. Right click on the key that you want to take full control of and select Permissions…
3. Click the Advanced button.

4. Go on the Owner tab. Select the user name that the current system is logged on, check “Replace owner on subcontainers and objects” and click OK.

5. Now you should be back at the Permissions window again. In Windows XP, click on EVERYONE and check Full Control for Allow. In Windows Vista, select the group that the currently logged on user belong to and check Full Control for Allow. Click OK.

Now you can modify and delete the protected registry keys. Windows protects those registry keys from being easily modified for a safety reason, so make sure you know what you’re doing before messing with it.
Related posts:
i am getting below error when selecting
registry couldn’t set owner
many Thanks !!
Thank you very much! This saved me an enormous amount of time!
Hi there, I am facing a problem which is failing to open registry keys during installation of Microsoft Office 2010 and other software such as (Nitro Pro). What should I do?
Thanks very much.
It worked perfectly fine on windows 7.
You know this doesn’t really work! Depending on the software installed you will get keys and or subkeys that you will not be able to inherit this way
thanks a lot buddy it worked for me
I had forgotten how – thanks for reminding me.
You are THE MAN
Wow !! Thanks !! Works Perfectly… :)
Hi,
I on Windows 7 and I did what you say but if I click “Replace owner on subcontainers and objects” then click “Apply” it say “Unable to set new owner on 0000, Access id denied”
Thanks – this helped me out as well. I tried doing an upgrade install with slipstream disk for Vista SP2, but couldn’t get that to work. I deleted registry keys found in checksur.log and Windows feature box came up with info finally
Thanks so much. I thought I completely messed up with the registry of my pc.
THANK YOU SO MUCH!!!!!!! trying to fix this allllll night,,, i love you man
Thanks a ton to the above poster. This got me out of the registry mess I was in. Sysinternals is awesome.
(Unless I am confused) there is a much easier solution to this, using the systernals psexec.exe file to grant permission to the registry editor. psexec.exe is part of the (free) systernals suite from microsoft here:
technet.microsoft.com/en-us/sysinternals/bb842062.aspx
Below is an example of a batch file that I run to start registrar (rr.exe) my registry editor. You can of course use this with any registry editor including regedit.
Start “” “e:\psexec\psexec.exe” -i -d -s “c:\Program Files\Registrar Registry Manager\rr.exe”
You can now delete any registry entry (including legacy keys).
Btw, the Registrar Lite is a terrific (free) registry editor; among other things allowing you to search for detritus from uninstalls better & quicker than any reg cleaner. You can find it here
resplendence.com/download/RegistrarLite.exe
(IMHO, the free version is just as functional as the paid version, save for minimal nag screens).
Ray,
I normally don’t reply to these posts but… Thank You!
I need to be able to mange 2008 group policy modifications from my windows 7 machine because or 2003 group policy management server isn’t able to manage some new schema functions.
But you got me in bussiness with your post.
Thanks again!
Bài viết của bạn rất bổ ích, mình loay hoay mất mấy ngày nay để mở các thư mục có biểu tượng khoá trong Win7 mà không xử lý được, nhờ bạn mình đã làm được rồi
It works in w7.
Thank you very much Raymond!
Thanks this worked for me
Could not modify owner permissions. Access is still denied. Trying to completely eradicate MagicISO which is causing virtual headaches. Will likely need to access the registry keys through another OS (multi-boot system).
I spoke too soon…it didn’t work on the really stubborn one. I get:
“registry could not set security level in the key currently selected”
Been looking for a solution like this for far too long, never thought to check that box, thanks for the fix!
Thanks Raymond.
Nice info.
interesting read on the
PowerPrompt.
Do take heed on its warning
”
WARNING: Very often there is a good reason for the restrictions imposed upon the administrator account. USE ONLY AS A LAST RESORT IN A PRODUCTION ENVIRONMENT AND ENTIRELY AT YOUR OWN RISK!!!
“
Thanks a lot. This is very useful info. I’m sure I’ll need to do this one day…
Ya just found out how to do this?
ever since the live help & support been going on, this blog has been very much useful indeed… keep on the good work. now i can learn a lot.
Thank you Raymond
An easlier alternative would be to run regedit with system privilege, which is higher than admin. This requires the person to have admin right to begin with.
Run Power prompt (dos prompt) and invoke regedit from within. Voila! You can now delete any key without having the change the rights.
hxxp://grubletrang.com/Software.aspx?app=PowerPrompt
link for commands on subinacl
[code]
drop.io/bxf2apu#
[/code]
A couple yrs.ago I got a customer’s machine that just would not straighten out…..I refuse to reinstall Windows on anyone’s machine, due to overkill.
The customer had an XP Home machine, and I decided to try the subinacl commands (for xp pro), it worked perfectly, took about 15 min. to reset all reg keys.
[code]
microsoft.com/downloads/details.aspx?familyid=e8ba3e56-d8fe-4a91-93cf-ed6985e3927b&displaylang=en
[/code]
will be back later with the file that I made that goes with the command.
interesting,and protective
thanks.
good info….thanks Raymond
Wow, the keys to the kingdom for anyone to use. That should be fun..
Thanks for the info.
“Who dares,wins”
Anonymous.
Hi,Raymond.Sorry for being a pain.I sent you an e-mail just to know the things I asked you but no answers.I know you must be very busy.but please let me know about it.
This post is great because I was never able to delete legacy keys.
People who I have told about you say that´s unbelievable what you are doing for computer novices.
Nice, thank you Raymond. :)
good info