If you’re encountering the error message An error is preventing this key from being opened while opening specific keys in Registry Editor on your Windows 10 computer, then this post is intended to help you with the solutions that we will present that you can try to help you remediate this issue.
Depending on the registry key you’re trying to open, you’ll receive the following full error message:
Key cannot be opened
An error is preventing this key from being opened.
Details: The system cannot find the file specified.
You’ll encounter this issue if you searched for registry key/location/data whose name is too long that the tool can’t handle it. And, also when your account do not have the required permissions to open/modify/delete a specific registry key.
An error is preventing this key from being opened
If this error is the case of the search for registry key/location/data whose name is too long that regedit can’t handle the search query, you can try splitting your search query. If you have the complete Registry location available, you can access it manually, key by key.
However, if it’s the case of your account do not have the required permissions to open/modify/delete a specific registry key, you need to run regedit as SYSTEM account rather than an administrator account (default).
This can be done using a command-line tool named PsExec. Here’s how:
First, download PsExec tool by Sysinternals from TechNet.
Upon extracting file, you’ll get PSTools folder. Copy all the content inside this folder to the directory path below. Replace C: with your system root drive.
In the CMD prompt window, copy and paste in the command below and hit Enter.
psexec -i -d -s c:\windows\regedit.exe
This command will launch Registry Editor with the system account.
You can try the search query again.
It should complete successfully without the issue.