As per Windows 10 users, an error prompt which states, “Cannot Delete Key: Error While Deleting Key” is recently going around the corner. It usually appears if you are trying to delete locked Registry keys that are protected to avoid accidental deletion.
Deleting or editing registry keys is known to resolve various operating system problems. However, the Windows registry is a sensitive database, and deleting keys should be avoided the most. Though if you want to delete the keys and avoid the error prompt simultaneously, try the fixes below:
Also Read
Page Contents
How to Fix Error While Deleting Key on Windows 10
Below are some effective fixes that will help you perform the action and avoid the “Cannot Delete Key: Error While Deleting Key” error on Windows 10.
FIX 1: Open Registry Editor with Administrator:
For deleting or editing any key (s) within the Registry Editor window, the user must have to access Administrator rights, or else making any changes would not be possible.
Hence while deleting key within the registry editor, if you are getting the “Cannot Delete Key: Error While Deleting Key” prompt, it is advisable to access the registry window again with Administrator Access. For doing so,
- On the Desktop search bar, type “regedit”. On the search results, navigate to Registry editor, right-click on it and then select the option Run as Administrator from the sub-menu.
- Once you begin to delete the key with administrator access, the said error prompt would not repeat.
FIX 2: Add RegDelNull to Windows:
RegDelNull is a Command line Utility. It helps you to search and later allow you to delete those Registry keys that are otherwise can’t delete using Registry editor because they contain embedded-null characters.
- You can download and save the RegDelNull ZIP file from Microsoft’s official website.
- Once downloaded, launch the ZIP file through File Explorer, click on the Extract all tab.
- Meanwhile, select the folder path where you want to extract the content into.
- Now in the Extracted folder, click the program’s exe and then open the Command Prompt window.
- Now type or Copy + Paste the following command and then press Enter.
regdelnull <key path> -s.
- Here you delete the registry keys that were otherwise showing the “Cannot Delete Key: Error While Deleting Key” prompt.
FIX 3: Add Registrar Registry Manager to Windows:
Registrar Registry Manager is a suite of tools that offers solutions for restoring, deleting, editing, or backing up the registry keys. It is an advanced third-party tool that let you delete those registry keys that were showing the “Cannot Delete Key: Error While Deleting Key” prompt.
All you need to do is, add the Registrar Registry Manager to your Windows 10 operating system and then delete the required registry keys within Registrar by the same process as the Registry editor.
FIX 4: Gain full permission to delete the registry keys:
For deleting the protected registry keys, it is ideal to gain full permission and then proceed further. It will help you avoid the “Cannot Delete Key: Error While Deleting Key” prompt as well. For doing so, follow the steps given below:
- Firstly, open the Registry editor as Administrator and here right-click on the Key (that you cannot delete) and then click on the option Permissions from the sub-menu.
- Now on the permissions window, click on the Advanced tab.
- Further, on the next window, click on the Change link (on the top, next to Owner) It will open the Select User or Group window.
- Here in the Enter the object name to select text box type your Windows user account name or Microsoft account e-mail address. Further, click on the Check Names tab for validating the account.
- Once the validation is done, click on OK and close the Select User or Group window. Again, click on OK and close the Advanced Security Settings window as well.
- Now on the Permission window, under Group or user names, select the User group and then click on the Allow box after the option Full control.
- After that, click on OK.
- Finally, you will be able to delete those keys in the registry editor, which we’re giving you the “Cannot Delete Key: Error While Deleting Key” prompt earlier.
These were some of the tried and tested methods that will help you in getting rid of the “Cannot Delete Key: Error While Deleting Key” prompt. Alternatively, you can also try other dedicated third-party tools and erase the locked entries with them.
However, the Windows registry editor is a susceptible database, therefore editing, deleting, or updating any key within wrongly can cause your system with a significant loss. Hence, it is advisable to avoid doing so unless you are highly sure about your steps. After reading this article, if you have any queries or feedback, please write down the comment in the below comment box.