Some users have reported that when trying to run a batch or trying to delete a registry key, the following error message appears stopping them from completing the task – Error: The system was unable to find the specified registry key or value.
In this post, we are going to talk about this issue and see what you can do to resolve this error.
Fix The system was unable to find the specified registry key or value
If you are seeing “The system was unable to find the specified registry key or value” error message in Windows 11/10 try the following solutions:
- Check if you are deleting a key or value
- Run System Restore
- Run SFC and DISM
- Run CHKDSK
- Troubleshoot in Clean Boot
- Repair System Files using Installation Media
Let us talk about them in detail.
1] Check if you are deleting a key or value
Some users who have reported this error are not deleting the key using the command, instead, they were deleting a value inside a key.
For example, one of the users was trying to run the following command to delete a key called Function.
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Cryptography\Configuration\SSL\00010002\Functions" /f
Now, the problem, in this case, is that the command won’t work. They needed to run the following command to delete the function key that’s under
Reg Delete "HKLM\SOFTWARE\Policies\Microsoft\Cryptography\Configuration\SSL\00010002" /V "Functions" /F > NUL
Make sure to run the command in the elevated mode of Command Prompt and you will be good to go.
2] Run System Restore
If you were deleting a key not a value and it’s not working, then the first thing you need to do is run the System Restore if you have created it beforehand, if not, you can skip this solution. It will revert your computer back to a time when things the issue was not there. To run System Restore, follow the prescribed steps.
- Search out “System Restore Point” from the Start Menu.
- Make sure that you are on the System Protection tab and click on the System Restore button.
- Select a restore point and select Next.
- Finally, follow the on-screen instruction to carry out the process.
Hopefully, this will do the job for you.
3] Run SFC and DISM
Next up, let us try and repair your system files. Maybe you are seeing this error message because your registries are corrupted. One way to repair those files is by running two cmd commands. Let us try to do the same. So, open Command Prompt as an administrator and run the following command.
If this doesn’t work we will run DISM in Command Prompt (admin) and see if that helps.
DISM.exe /Online /Cleanup-image /Restorehealth
Once the process is completed, you need to reboot your system. Hopefully, this will do the job for you.
4] Run CHKDSK
We have another command that will search your disk for bad sectors and repair them. To run it, open Command Prompt in elevated mode and execute the following command.
chkdsk /x /f /r
You will see a message “Chkdsk cannot run because the volume is in use by another process. Would you like to schedule this volume to be checked the next time the system restarts? (Y/N).”. Hit Y to confirm your actions.
Restart your computer and once the process is over, retry running the batch file and see if it helps.
5] Troubleshoot in Clean Boot
You may see the error message because of a third-party app. The app might interfere with your registry and stop it from getting deleted. Whatever the case is, you should perform Clean Boot and then try running the batch file, deleting the registry, etc. If this worked and you want to find out who is the culprit, try manually enabling processes and boil it down to one. Then, you can remove that program to make sure that you don’t encounter this error in the future.
6] Repair System Files using Installation Media
If nothing works then try repairing your system files using Installation Media. After repairing your files, go ahead and see if the issue persists. Hopefully, this will do the job for you.
We hope that you are able to resolve this issue using these solutions.
How do I fix The system was unable to find the specified registry key or value?
The error code in question can be resolved using the solutions mentioned in this post. Mostly the error is caused due to corrupted registry or system files, so, mostly, you need to repair them. You can start troubleshooting from the first solution and then move your way down. One of the solutions will do the job for you.
Why Regedit is not opening?
Regedit may not open or starts crashing because of various reasons. If it’s crashing in the middle of the session, then maybe the maximum length of a Registry key is set to 255 bytes, in which case the Registry Editor keeps looking for it leading to a crash. Whatever the case is, check our guide on what to do if Registry Editor is not opening, crashing, or stopped working.