Donation Goal
Donate Now Goal amount for this year: 799 USD, Received: 100 USD (13%)
Please donate to help support this website. The funds will be used to purchase owned license of LiteSpeed Web Server Enterprise (2-CPU). It provides superior performance in terms of raw speed, scalability and anti-DDoS capabilities.

Full Control Permission to Delete or Edit Restricted Windows Registry

Posted By Raymond In Category: Computer

Mar
5
2009

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.“.
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.
Check Currently Logged On User Name

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.
Setting Registry Permissions

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.
Taking Registry Ownership

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.
Full Control Registry Permissions

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:
  • How To Edit Windows Registry Key Values without Booting in Windows
  • RegDefrag: Does It Really Defrag Windows Registry Entries?
  • One Click Windows Registry Optimizer
  • How To Monitor for Registry and File Changes in Windows
  • FREE 4 Years Norman Virus Control Full License Key Code for EVERYONE
    • mazani

      good info

    • Rekhyt

      Nice, thank you Raymond. :)

    • mamed

      “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.

    • Roy Raay

      Thanks for the info.

    • Jeff

      Wow, the keys to the kingdom for anyone to use. That should be fun..

    • braco

      good info….thanks Raymond

    • http://www.ezpctips.blogspot.com ferdi

      interesting,and protective
      thanks.

    • Jeannie

      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]
      http://www.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.

    • Jeannie

      link for commands on subinacl

      [code]
      http://drop.io/bxf2apu#
      [/code]

    • nameless007

      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://www.grubletrang.com/Software.aspx?app=PowerPrompt

    • Merlin_Magii

      Thank you Raymond

    • Azfar

      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.

    • hernon

      Ya just found out how to do this?

    • Heath

      Thanks a lot. This is very useful info. I’m sure I’ll need to do this one day…

    • Jeannie

      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!!!

    • ahashmi06

      Thanks Raymond.
      Nice info.

    • http://www.sciencetext.com/ten-brutal-twitter-tips.html David Bradley

      Been looking for a solution like this for far too long, never thought to check that box, thanks for the fix!

    • http://www.sciencetext.com/ten-brutal-twitter-tips.html David Bradley

      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”

    • dan

      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).

    • Dazza

      Thanks this worked for me

    • kash

      It works in w7.
      Thank you very much Raymond!

    • http://CảmơnRaymond thanhsondo

      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

    • Greg

      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!

    • blue

      (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:

      http://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

      http://www.resplendence.com/download/RegistrarLite.exe

      (IMHO, the free version is just as functional as the paid version, save for minimal nag screens).

    • Vijay

      Thanks a ton to the above poster. This got me out of the registry mess I was in. Sysinternals is awesome.

    • Mikkel

      THANK YOU SO MUCH!!!!!!! trying to fix this allllll night,,, i love you man

    • Pie

      Thanks so much. I thought I completely messed up with the registry of my pc.

    • PRB238

      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

    • http://www.raymond.cc/blog/archives/2009/03/05/full-control-permission-to-delete-or-edit-restricted-windows-registry/ Al

      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”

    • Shaer Alvy

      Wow !! Thanks !! Works Perfectly… :)

    • Johan

      You are THE MAN

    • Merlin_Magii

      I had forgotten how – thanks for reminding me.

    • kalyan

      thanks a lot buddy it worked for me

    • Claudius

      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

    • James Frimpong

      Thanks very much.

      It worked perfectly fine on windows 7.

    • Lance

      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?

    Copyright © 2005-2012 - Raymond.CC Blog