Yet, some users are met with Cannot delete key: Error while deleting key prompt while trying to delete a locked registry key. This guide will show you how to fix this error on your PC.

Why can I not delete the registry key?

The reasons you are getting an error while deleting a key on Regedit are not far-off. Below are two major ones:

Lack of permission: Registry keys are treated like files and folders on your PC. So, if Windows 10 is showing an error while deleting a key, it might be because you don’t have permission to delete them. So, the solution here is to take ownership of the keys and try to delete them again. Presence of null characters: If the key you are trying to delete contains null keys, you might be unable to delete all specified values. You can fix this by adding RegDelNull to your PC.

How do I fix the Error while deleting key issues?

1. Open the Registry Editor as Administrator

The first thing to do if you are getting an error while deleting a registry key is to run Registry Editor as an admin. This is because your PC considers registry key deletion highly privileged. So, you need to have administrative rights to do it.

2. Edit the Registry Key’s Permissions

If you are getting an error while deleting a registry key, it might be because you don’t have ownership of the key. Following the steps above will give you full control of the keys.

3. Add RegDelNull to Windows

Another possible reason you are getting an error while deleting a key is the activities of the null characters in the key. The RegDelNull will help replace these null characters and help you delete the key easily.

4. Use PSExec

If you still get an error while trying to delete a registry key after changing the permission, you need to use PSExec. This has proved effective for many users. So, you should try it too. SPONSORED

5. Delete the key with Registry DeleteEx

If all the solutions above prove futile in fixing the error while deleting a key prompt, you might need to try an alternative. One effective program that users have found joy in using is DeleteEx. This tool has a GUI that you can erase locked registry entries. Furthermore, you can also select to erase all the key’s subkeys. As this software includes more settings, DeleteEx might be a better program for deleting registry entries with than There you have it: Everything you need to fix the error deleting a key prompt in Windows. Just make sure you follow the instructions carefully, and you should be able to delete your registry keys again. If you made a mistake and want to know how to undo changes on Registry Editor, check our detailed guide to do it quickly. Feel free to let us know the solution that worked for you in the comments below.

Name * Email * Commenting as . Not you? Save information for future comments
Comment

Δ