Access denied on the registry

  • Thread starter Jean-Charles Meyrignac
  • Start date


Jean-Charles Meyrignac

I'm trying to install VS2008 since yesterday.

It crashes when it tries to install Document Explorer 2008.
So, I ran the Document Explorer installer, and the exact error is:

Error 1402.
Unable to open key
System error 5

Indeed, with regedt32.exe, I have no access to
even though I'm an administrator of my computer, and UAC is disabled.
I also cannot remove the registry keys.

My question is: how can I remove the registry keys ?
(Reinstalling Vista is NOT an option)



Jean-Charles Meyrignac

Trying to uninstall VS2005, I get similar errors:

[11/27/07,17:58:34] Microsoft Visual Studio 2005 Professional Edition - ENU:
[2] ERROR:Error 1402.Could not open key:
Verify that you have sufficient access to that key, or contact your support

Jean-Charles Meyrignac

James Matthews said:
install with admin rights

No, it doesn't work !

I tried as follows:

1) Run as Administrator on regedt32.exe, and it's unable to access the
registry key
2) Restart/Log as administrator, and run regedt32.exe, and it's also unable
to access the registry key

I think my registry is corrupted, but I don't know how to repair it, and
installing my system again makes me want to install XP instead of Vista (I've
too much problems, even though I'm a developer !!!).


Jean-Charles Meyrignac

I'm beginning to understand what happens !

It seems that some registry keys are FORBIDDEN to everybody.

I found that by executing:

psexec -s -i regedt32
(trick found on

With this, I can access all registry keys.
And it appears that when I access the rights for the registry key having a
problem, it says (translated from french): no group nor user is allowed to
access to this object. However, the owner of this object can change its

And then, I have now another problem:
I have to add ADD the rights manually.
I tried to change the rights by changing the rights on the root of
HKEY_LOCAL_MACHINE (in Advanced, you can force to apply the rights
recursively), but regedt32 is unable to modify rights that don't exist !

Any idea how to repair the registry without accessing every key one by one
manually ?


Still progressing on my problem....

I found that my computer has 729 registry keys that have no assigned
rights !
For example:

I think the problem may be due to installing the software with a local
account (with administrator rights), then I entered a domain and
removed this account.

I think it's a bug from Vista, since it's impossible to open the keys
that have been created by this removed account !
(Of course, it's possible with psexec -s -i regedit)

AccessEnum is unable to open these registry keys either.

I wrote a small tool that checks all registry keys and displays the
ones that are impossible to open.
The next part will be to automatically repair the rights, since I
don't think I'll have the patience to edit every of the 729 keys
manually !

I'm currently having another obscure problem while developing a Web
Service, that fails to work because it needs Windows authentication,
and it's not passed as it should.
Damn Vista !




Jimmy Brush


This does sound like a registry corruption issue.

To fix the keys, you can take ownership of the keys using the advanced
security dialog (or equivalent API's), and then add the appropriate




Issue: Access denied to some keys in the register, even though it was
accessed with admin rights.

I had the same problem trying to reinstall Skype. It returned an error
advising it could not access the key SPhoneParser.FoundSkypeNumber in
localmachine-software-classes. I later found these keys (and other that
could not be accessed) had no permissions set. If you click on them, you
receive a message sort of "key cannot be open". If you right click it, you
get a message sort of "you cannot see the permissions but you can change
them" (Who is the Microsoft guy who developped this modules? Weird thinking!)

1. Possible causes. A few days ago I had uninstalled Skype because it was
crashing the IE7. I decided to do a clean uninstall and used regseeker to
delete all skype entries on the register, following an advise I saw on the
web. My guess is that the application deleted most of the skype entries, but
to some of them it just deleted the permissions!

2. How I solved the problem:
First, let it be known that I tried psexec to open the register and I also
opened directly, but the results were the same.

Right click the key. The message says you "cannot see the permision but you
can change it". Okey it. Click ADD, then ADVANCED then SEEK (or FIND NOW) and
when the list of users/groups come up, choose administrator. ACCEPT twice and
then check out "Total control" to grant permissions and Accept. Get to
ADVANCE (SECURITY SETTINGS) and check the box to "include all the permissions
from the primary/parent object" (Your Windows English version may say
something a bit different. Mine is in Spanish). Click accept. At that moment,
the key should have its permissions set, equal to those of the parent key

Close the permissions window and now you should be able to access the key.
Then you can install the program which needed access to that key during
installation. If still another key comes up as unaccessible, repeat the
process with it.

Beno Ghitis

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question