5 Ways to Fix Error While Deleting Key

4. Manually Edit Registry permissions

First of all, you need to make sure that your account has administrative privileges to be able to edit the registry. And secondly, to edit the restricted registry you need to know what the currently logged on user’s name is. You should know this but if you’re not exactly sure of the current user name, a simple way of telling is clicking on Start and looking at the top (XP) or top right (Vista/7) of the Start menu. Alternatively find out from the Windows Task Manager. Simultaneously press Ctrl+Shift+Escape, go to the Processes tab and check the User Name column. You should see SYSTEM, LOCAL SERVICE, NETWORK SERVICE and the logged on User name.

Check Currently Logged On User Name

Now simply follow the steps below to take full control of a restricted registry key. There are thousands of protected keys in the registry with varying levels of restrictions, do not that not all keys can be deleted even using this method.

1. Run the Registry Editor by typing regedit in the Run box (Win key+R) or from the Start search box.

2. Navigate to the registry key you want to take full control of, right click on it and select Permissions. Then click the Advanced button.

Setting Registry Permissions

3. Go to the Owner tab, select the user name that the system is logged on with and tick “Replace owner on subcontainers and objects” and click OK.

Taking Registry Ownership

4. Now you should be back at the Permissions window again. In Windows XP, click on Everyone and then tick Full Control for Allow. In Windows Vista and Windows 7/8, select the group which the currently logged on user belongs to (Administrators) and tick 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.


Depending on which keys you’re trying to edit, the above steps still might not be enough and you’ll get “Error while deleting key” again with the Allow tick boxes grayed out. If that’s the case, follow these extra steps:

1. Click on Advanced again and in the window highlight the same user group from step #4 above.

2. Tick the “Replace all child object permissions with inheritable permissions from this object” box and untick “Include inheritable permissions from this object’s parent”. Click Add (or Copy for XP) in the warning popup and then OK. The grayed out Allow tick boxes should now be enabled and already ticked, now try to edit the key.

inherit extra permissions

Unfortunately there are still certain keys in the registry which cannot be edited because they are in use and locked by the system. No amount of permissions tweaking will allow them to be touched. In that scenario the only other option may be to edit the registry while it is offline.


5. Using low-level anti-rootkit tools

Anti-rootkit tools are very powerful low-level utilities that is capable in detecting and removing rootkits. There are 2 of such anti-rootkit tools that comes with a registry editor which looks very similar to the Windows regedit except it bypasses the Windows restrictions to allow full control in deleting and editing restricted registry keys.

AntiSpy Delete Restricted registry

All you need to do is run either AntiSpy or PC Hunter, go to the Registry tab, navigate to the key that you cannot delete from the Windows regedit, right click and select Delete. The deleted keys takes effect instantly without requiring a restart.

Download AntiSpy | PC Hunter

100 Comments - Write a Comment

  1. Raymond 2 years ago
  2. KirkH420 2 years ago
  3. amir 3 years ago
  4. Ken 4 years ago
  5. DrMoisheP 4 years ago
  6. KanikaKanjari 4 years ago
  7. Michael 5 years ago
  8. prabhu 5 years ago
  9. Nummnutts 5 years ago
  10. DhiRu 6 years ago
  11. DhiRu 6 years ago
  12. Indra 6 years ago
  13. name 6 years ago
  14. Jean 6 years ago
  15. iKeddz 6 years ago
  16. chiudo 7 years ago
  17. Robbie 7 years ago
  18. Yerbol 7 years ago
  19. Deepak Verma 7 years ago
  20. MoltresRider 7 years ago
    • HAL9000 7 years ago
  21. Another nice one 7 years ago
  22. VINCY 7 years ago
  23. shahrooz 7 years ago
  24. Jon 7 years ago
  25. Highlander 8 years ago
  26. A 8 years ago
  27. Hakim 8 years ago
  28. Carlos 8 years ago
  29. Damien 8 years ago
  30. Vedaprakash 8 years ago
  31. Minami 9 years ago
  32. william campbell 9 years ago
  33. Anthony 9 years ago
  34. Matthew 9 years ago
  35. Yubaraj 9 years ago
  36. Marek 9 years ago
  37. Mr.Afridi 9 years ago
  38. Pete 9 years ago
  39. Scott 9 years ago
  40. Galahad 9 years ago
  41. Masonic_Knight_Templar 9 years ago
  42. Thanks 9 years ago
  43. Raja (India) 9 years ago
  44. Bruce 10 years ago
  45. [email protected] 10 years ago
  46. Mayura 10 years ago
  47. Anon 10 years ago
  48. Tom 10 years ago
  49. Sammy 10 years ago
  50. RunAsTheMAN 10 years ago
  51. lemon 10 years ago
  52. cad 10 years ago
  53. Joan 10 years ago
  54. Nico 10 years ago
  55. Fakhri Aunurrahim 10 years ago
  56. rajiv 10 years ago
  57. Aditya 10 years ago
  58. Taaniel 10 years ago
  59. J M Ward 10 years ago
  60. Nestor 10 years ago
  61. Jawher Bel Mabrouk 11 years ago
  62. Joe Isaac 11 years ago
  63. amer 11 years ago
  64. prasenjit 11 years ago
  65. Henk Boonstra 11 years ago
  66. Pierre Lariviere 11 years ago
  67. godslave 11 years ago
  68. Pradeep KR 11 years ago
  69. Dan 11 years ago
  70. Roberto 12 years ago
  71. Ali Asadullah 12 years ago
  72. Dc 12 years ago
  73. Gus 12 years ago
  74. Denyzor 12 years ago
  75. Someone 12 years ago
  76. James Frimpong 13 years ago
  77. kalyan 13 years ago
  78. Merlin_Magii 13 years ago
  79. Johan 13 years ago
  80. Shaer Alvy 13 years ago
  81. PRB238 13 years ago
  82. Pie 13 years ago
  83. Mikkel 13 years ago
  84. Vijay 14 years ago
  85. Greg 14 years ago
  86. kash 14 years ago
  87. Dazza 14 years ago
  88. David Bradley 15 years ago
  89. ahashmi06 15 years ago
  90. Heath 15 years ago
  91. Azfar 15 years ago
  92. Merlin_Magii 15 years ago
  93. ferdi 15 years ago
  94. braco 15 years ago
  95. Jeff 15 years ago
  96. Roy Raay 15 years ago
  97. mamed 15 years ago
  98. Rekhyt 15 years ago
  99. mazani 15 years ago

Leave a Reply

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

Note: Your comment is subject to approval. Read our Terms of Use. If you are seeking additional information on this article, please contact us directly.