Raymond.CC Blog
  • Home
  • Forum
  • Giveaway
  • X-Ray 2.0
  • Contact
  • About
  • I’m Feeling Lucky
Search the site...
You are here: Home » Windows » 5 Ways to Solve Error While Deleting Key Problem When Editing Restricted Registry

5 Ways to Solve Error While Deleting Key Problem When Editing Restricted Registry

Updated by HAL9000 - 1 month ago - Windows
36
  • Like
  • +1
  • Tweet
  • Printer Friendly and PDF
edit registry icon

Most advanced users know all about it, but if you didn’t know what the Windows registry is, it’s a several megabyte database that stores most of the information for your Windows operating system. It contains thousands of configuration settings for Windows itself, third party software, hardware and preferences for the individual users on the computer. Editing the Windows registry can be dangerous if you don’t know what you’re doing because if you wrongly delete an important key, Windows might not be able to boot up the next time.

So no matter how confident and experienced you are, it’s always a sensible idea to be a little bit safer and make a backup of the registry keys that you intend to edit, or even better, make a complete backup of the whole registry as well just in case. If you’re trying to edit or delete keys from the registry to repair or recover from certain problems, you might find that some keys won’t let you do anything with them and you’ll get an error such as “Cannot delete xxxxx: Error while deleting key”. These keys are usually protected to stop accidental deletion and it’s important you have the correct key before trying to change it.

Error While Deleting Key

You could also be the administrator on the computer, but still can’t manipulate the required key, which might sound quite odd. Even though the administrator account has a great deal of control, there are other hidden accounts and levels on the system which have even greater access and therefore standard administrator privileges are not enough. To solve this problem, you have to force the registry to allow the logged on user full control of the subkeys. Below are several different ways of performing this operation to give you the required access.

1. Run Regedit using the RunAsSystem tool

As well as being able to take ownership of registry keys and setting the permissions manually, another thing you can do is run the Windows registry editor with highly elevated privileges. This can be achieved with the System account that is even more powerful than the administrator and therefore has more access to protected registry keys. This has the added bonus of allowing you to view the SAM and SECURITY registry keys which are otherwise hidden. A small portable tool called RunAsSystem is able to do this for any program you tell it to, here’s how.

1. Download RunAsSystem, extract and run it.

2. Click the Browse button and look for regedit.exe which is normally located in the Windows folder, or simply type regedit into the box.

RunAsSystem

3. Click OK which will open the Registry Editor. If you open up the Task Manager, and as you can see from the screenshot below, regedit.exe is now running under the SYSTEM account where it would normally run under the user’s standard account. You can delete several legacy keys without the “Error While Deleting Key” message.

Regedit as System

RunAsSystem is also useful if you want to restore any registry keys that were deleted this way because importing the keys would produce a “Cannot import file.reg: Error accessing the registry” message from the standard admin/user account. The solution is to either run regedit as System, and import it from File -> Import, or run the .reg file using RunAsSystem.


2. Use the PsExec tool

The PsExec command line utility is part of the PSTools remote administration set of command line utilities from Sysinternals. Like the RunAsSystem tool, PsExec also allows you to see the SAM and SECURITY keys that are hidden under normal circumstances. It works in a similar way too by elevating the registry editor to run under the System account granting more control over the registry. You need to make sure you have administrator privileges in the first place for this to work.

1. Download and extract the PSTools.zip file from the Sysinternals website. Right click on the PsExec utility and click Create Shortcut (or Send to -> Desktop).

2. Right click on the shortcut -> Properties and add the following to the end of the line in the Target box:

{space}-i -d -s c:\windows\regedit.exe

regedit with psexec
3. Click OK and then double click the shortcut to launch Regedit under the System account. If you’re still unable to delete or edit the keys you want, try the next solution below.


3. Registrar Registry Manager

Registrar is a registry editing tool with several advanced features and is a lot more like a standard Windows Explorer interface with toolbar buttons for back, forward, cut, copy, paste etc. It also has advanced searching and comparing functions, bookmarking, a registry defragmenter and a backup and restore option. There are other features such as multi level undo and remote registry editing, but they along with several other features are only available in the Professional version which costs around $55.

Thankfully there is a free Home Edition that allows you to browse and edit the registry without any problems, the only downsides are the nag screen and not knowing some functions aren’t in the free version until you click on them. Like the tools above it also shows the usually hidden SAM and SECURITY keys, and while testing it was able to edit or delete a number of the registry keys that the tools above couldn’t. Keys you would normally have to edit the permissions manually to delete such as those that need removing to repair the Features window problem in Windows Vista or 7 are done so with the click of a button.

Registrar Registry Manager

Usage is pretty much the same as regedit and you simply navigate your way to the required key and then right click on it or use the buttons in the toolbar to rename or delete etc. If manually editing registry permissions sounds to confusing, this might be your best option. Registrar can also be made portable by copying its folder from Program Files, and works on Windows XP up to Windows 8.

Download Registrar Registry Manager Home

If even these tools aren’t working for you, the next option will be to edit the permissions for the key manually using Regedit or simply use a low-level anti-rootkit tool. On page 2 we’ll show you how.

  • < Prev
  • 1
  • 2
  • Next >


Didn't find what you want? The links below could help:

Recover and Export Data from Offline Registry FilesRecover and Export Data from Offline Registry FilesRestore Windows Notepad to the Default Font or SettingsRestore Windows Notepad to the Default Font or SettingsRestore Deleted Services and Reset to Default Services SettingsRestore Deleted Services and Reset to Default Services SettingsEasily Reset Windows Settings to Default State with RefreshPCEasily Reset Windows Settings to Default State with RefreshPC

36 comments on “5 Ways to Solve Error While Deleting Key Problem When Editing Restricted Registry”

  1. prasenjit says:
    2 weeks ago

    RunAsSytem Worked on Win7 64bit

    Reply
  2. Henk Boonstra says:
    3 weeks ago

    Works flawlessly, THX!

    Reply
  3. Pierre Lariviere says:
    1 month ago

    Thanks Raymond, PsExec did the job! I had *almost* given up getting rid of these troublesome entries.
    Thanks again, now I’ll sleep better tonight ;)

    Reply
  4. godslave says:
    2 months ago

    you made my day a better day thanks

    Reply
  5. Pradeep KR says:
    2 months ago

    Thank you its working fine :)

    Reply
  6. Dan says:
    3 months ago

    I’d taken out Comodo Firewall on a Windows 7 Home Premium 64 bit last week, and was going stir trying to get legacy keys out (all BUT driver inspect.sys and legacy keys removed by usual uninstall)…nobody else had the right permissions description, but I tried YOURS on all CF legacy keys in one sitting, rebooted, and BAM! All those enum legacy keys stopped regenerating! You keep things not only easy, but fast and bang-on! Thank you!

    Reply
  7. Roberto says:
    7 months ago

    Thank you so much the only solution that works!

    Reply
  8. Ali Asadullah says:
    7 months ago

    Great man… Very Good THANK YOU ! !

    Reply
  9. Dc says:
    8 months ago

    Totally genius! Big THANK YOU

    Reply
  10. Gus says:
    11 months ago

    Raymond…you are the MAN! It worked just as advertised. THANKS!!!!!!!

    Reply
  11. Denyzor says:
    1 year ago

    many Thanks !!

    Reply
  12. Someone says:
    1 year ago

    Thank you very much!  This saved me an enormous amount of time!

    Reply
  13. James Frimpong says:
    1 year ago

    Thanks very much.
    It worked perfectly fine on windows 7.

    Reply
  14. kalyan says:
    1 year ago

    thanks a lot buddy it worked for me

    Reply
  15. Merlin_Magii says:
    1 year ago

    I had forgotten how – thanks for reminding me.

    Reply
  16. Johan says:
    1 year ago

    You are THE MAN

    Reply
  17. Shaer Alvy says:
    1 year ago

    Wow !! Thanks !! Works Perfectly… :)

    Reply
  18. PRB238 says:
    2 years ago

    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

    Reply
  19. Pie says:
    2 years ago

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

    Reply
  20. Mikkel says:
    2 years ago

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

    Reply
  21. Vijay says:
    2 years ago

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

    Reply
  22. Greg says:
    3 years ago

    Ray,
    I normally don’t reply to these posts but… Thank You!
    I need to be able to manage 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 business with your post.
    Thanks again!

    Reply
  23. kash says:
    3 years ago

    It works in w7.
    Thank you very much Raymond!

    Reply
  24. Dazza says:
    3 years ago

    Thanks this worked for me

    Reply
  25. David Bradley says:
    4 years ago

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

    Reply
  26. ahashmi06 says:
    4 years ago

    Thanks Raymond.
    Nice info.

    Reply
  27. Heath says:
    4 years ago

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

    Reply
  28. Azfar says:
    4 years ago

    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.

    Reply
  29. Merlin_Magii says:
    4 years ago

    Thank you Raymond

    Reply
  30. ferdi says:
    4 years ago

    interesting,and protective
    thanks.

    Reply
  31. braco says:
    4 years ago

    good info….thanks Raymond

    Reply
  32. Jeff says:
    4 years ago

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

    Reply
  33. Roy Raay says:
    4 years ago

    Thanks for the info.

    Reply
  34. mamed says:
    4 years ago

    “Who dares,wins”
    Anonymous.
    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.

    Reply
  35. Rekhyt says:
    4 years ago

    Nice, thank you Raymond. :)

    Reply
  36. mazani says:
    4 years ago

    good info

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recently Updated

  • backtrack icon

    Best Compatible USB Wireless Adapter for BackTrack 5, Kali Linux and Aircrack-ng

  • flash bios icon

    5 Tools to Easily Install FreeDOS or MS-DOS onto USB for BIOS Flashing

  • avast icon

    Reset or Remove avast! Authorization Password to Access Settings

New Articles

  • task manager replacement icon

    Memory Usage Test to See Which is the Lightest Antivirus Software

  • kaspersky antivirus 2013 icon

    Activate Free Kaspersky Anti-Virus 2013 ROG with 1 Year License

  • remote access software

    Top 8 Remote Access Software for Providing Online Support

Popular Posts

  • Top 10 FREE Data Recovery Software

    Top 10 FREE Data Recovery Software

  • How to Hack Into a Windows XP Computer Without Changing Password

    How to Hack Into a Windows XP Computer Without Changing Password

  • 10 Free Software to Mount CD or DVD ISO Image File as Virtual Drives

    10 Free Software to Mount CD or DVD ISO Image File as Virtual Drives

Recommend on Google
Follow @raymond_cc
Subscribe Youtube »
(c) 2013 Raymond.CC Blog
  • Contact
  • Disclaimer
  • Disclosure
  • Privacy Policy
  • Terms of Use
  • Sitemap