Some users have reported that when trying to run a batch or attempting to delete a registry key, the following error message appears, preventing them from completing the task:
Error: The system cannot find the specified registry key or value.
This error may usually happen, and here is a true example from the microsoft.com forum.
Installed “Neat Receipts” and got an error message. Now I cannot shut down my PC and all I know for sure is that the system 32 error message is serious。 Original title: C:Windowssystem32cmd.exe__ERROR: The system was unable to find the specified registry key or value.https://answers.microsoft.com/en-us/windows/forum/all/error-the-system-was-unable-to-find-the-specified/
The cause of this error may be various. How to fix this error? Please keep reading. Here we show you 6 ways to solve it.
Way 1: Check If You Are Deleting a Key or Value
According some users reported that instead of using the command to delete the key, they deleted the value in the key. For example, one of the users tried to run the following command to delete the key named Function.
reg delete “HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftCryptographyConfigurationSSL 0010002Functions” /f
Now, in this case, the problem is that the command doesn’t work. Therefore, to perform the task, you need to use the correct syntax to delete the registry value:
Reg delete “HKLMSOFTWAREPoliciesMicrosoftCryptographyConfigurationSSL 0010002” /V “Functions” /F > NUL
You’ll also need to run the elevated mode of Command Prompt as an administrator to prevent the Access is denied message.
Way 2: Perform System Restore
If you’re deleting keys and not values and it doesn’t work, the first thing you need to do is run System Restore (if you created a system restore point beforehand). The system restores point is a built-in feature that can help you restore your Windows system to an earlier date without affecting your files and data. Here are the detailed steps.
Create a System Point
Windows allows you to create a restore point. With it, you can revert the computer to the previous date. Here is how to do it:
Step 1: In Windows 10, input system restore in the Search box and click Create a system restore point.
Step 2: In the System Properties dialog box, click Configure and check Turn on system protection.
Step 3: Then click Create to start creating the restore point.
Restore Windows to the Previous Date/Time
In case of system problems, you can restore your computer to an earlier date using the restore point you created. Here is how to do it:
Step 1: Whenever you want to restore your computer from a system restore point, just click System Restore in the System Protection tab to start the system restore. Then click the Next button.
Step 2: The restore point you have created will be listed here. Just select it and click Next to continue.
Step 3: Then you need to confirm the restore point. After clicking Finish, a warning will tell you the restore process can’t be interrupted once it starts.
If your computer fails to boot, you can’t restore from a system restore point in Windows 10/8/7, you can refer to this article.
Way 3: Run SFC and DISM
This “error: the system was unable to find the specified registry key or value” error message is possible because your registry is corrupted. One way to repair these files is to run two repair system tools – SFC and DISM.
The first tool is SFC (System File Checker), which detects and restores missing components. The other is the DISM (Deployment Image Servicing and Management) tool, which fixes more complex system errors. It uses different algorithms to find problems and fix corrupt data that SFC might miss.
Here’s how to perform these scans:
Step 1: Type command prompt into the Search box. Then right-click on the first search result and select Run as administrator to open the Command Prompts as administrator.
Step 2: In the Command Prompt window, type the following command: sfc /scannow and press Enter.
Step 3: After the scanning process is complete, if it describes that the corruption is resolved, close Command Prompt and restart Windows 10.
If the SFC tool fails to repair corrupted files, you can use the DISM tool.
Step 1: Open the Command Prompt as administrator. Then type DISM.exe /Online /Cleanup-image /Restorehealth. Then press Enter.
Step 2: After the scanning process is complete, restart your computer to check if the error has been solved.
Way 4: Fix the Bad Sector on Hard Disk
The bad sectors or the corrupted file system in the hard disk are likely to cause the “error: the system was unable to find the specified registry key or value” error in Windows 10. Here are two options to fix the bad sector on the hard disk.
Option 1. Run CHKDSK Utility
You can use the CHKDSK utility to investigate and repair bad sectors in the disk drive to fix this error.
To run it, open a command prompt in elevated mode and execute the following command.
Step 1: In Command Prompt, type chkdsk *: /f /r command and press Enter key to execute (* is the letter of drive of the problematic hard drive).
Step 2: Run the CHKDSK command for every partition. After execution, restart the computer and check if the error is resolved.
Option 2: Use MiniTool Partition Wizard
If you are not familiar with the command or find using it error-prone as it requires you to type each command correctly, in this way you can use the free CHKDSK repair alternative to repair the hard drive Windows 10. It is recommended to use the MiniTool Partition Wizard to make CHKDSK Windows 10 a breeze.
MiniTool Partition Wizard is an easy-to-use partition manager. You can use the Check File System and Surface Test feature to help you scan your hard drive and fixes any errors detected and solve the “error: the system was unable to find the specified registry key or value” error.
In addition to checking file system capabilities, it can perform other operations like formatting partitions, resizing partitions, extending partitions, copying partitions/disks, converting MBR to GPT without data loss, wiping disks, and converting FAT to NTFS.
MiniTool Partition Wizard FreeClick to Download100%Clean & Safe
Step 1: Launch MiniTool Partition Wizard to get the main interface.
Step 2: Then select the partition on the hard disk and select Check File System on the left operation panel.
Step 3: In the pop-up window, select Check & fix detected errors and click the Start button.
Step 4: MiniTool Partition Wizard will start scanning the file system. After the scan process is completed, you can see the scanning and repair results.
Step 5: Then select the partition on the hard disk and select Surface Test on the left operation panel.
Step 6: In the pop-up window, click the Start Now button to immediately check the bad sectors for Windows 10.
Step 7: When the hard drive error test process is completed, the disk blocks that have no read errors will be marked in green. However, if MiniTool Partition Wizard finds some hard disk errors, the blocks will be marked as red.
This disk management tool detects bad physical sectors. If you find too many bad sectors on the hard drive, you need to replace the disk.
Way 5: Run Clean Boot
You may see the “error: the system was unable to find the specified registry key or value” error message due to third-party applications. The application may interfere with your registry and prevent it from being removed. In this case, you should perform a clean boot, then try running batch files, deleting the registry, etc.
Step 1: Press the Win + R key to open the Run dialog. Then type msconfig in the box and press Enter.
Step 2: Switch to the Services tab, and check the Hide all Microsoft services box. Then click the Disable all button.
Step 3: Switch to the Startup tab and click Open Task Manager.
Step 4: Click the startup program that may interfere with Windows 10 update and click Disable. Then repeat this step to disable all suspected programs.
Step 5: Close Task Manager and click the OK button in System Configuration.
After that, restart your computer to check if the issue exists.
Way 6: Repair System Files Using Installation Media
If the above doesn’t work, then try using the installation media to repair your system files. Here take Windows 10 as an example. The steps are as follows:
Step 1: Create a Windows 10 installation USB drive
- You need to have a USB stick with at least 8 GB of free space. There should be no important files in it because the creation process will erase all files in the USB flash drive. Then, connect it to your computer.
- Go to the software download page for Windows 10.
- Click the Download tool now button under Create Windows 10 installation media.
- Double-click the downloaded Windows 10 Media Creator (.exe file) to open it. Then, follow the on-screen guide to create a Windows 10 installation USB drive.
Step 2: Boot your computer from the installation USB drive
- Start the computer to enter the BIOS.
- Change the boot order and set your computer to start from a connected Windows installation USB drive.
- When you see the following Windows Setup interface, it means that your device has successfully booted from the Windows installation USB disk.
Step 3: Choose the Right Tool to Repair Your Windows Computer
- Click Next on the Windows Setup interface to continue.
- On the next page, click Repair your computer.
- Click Troubleshoot.
- You will enter the Advanced options screen where you can see the following options:
Startup Repair, Command Prompt, Uninstall Updates, System Restore, System Image Recovery
- Click Startup Repair and follow the on-screen instructions to do it.
After that, check if the problem gets fixed.
What’s Your Opinion
This article illustrates 6 ways to fix “error: the system was unable to find the specified registry key or value”. You can try these solutions one by one. Besides, this post introduces a professional tool to check if a hard disk has bad sectors.
After trying so many solutions, we believe that you may have successfully solved your problem. If you have any suggestions or need any help when you use MiniTool Wizard Partition, you can send us an email at [email protected] or leave a comment below. Thank you in advance.