Unable to uninstall Visual Studio 2008, could not open Components key

6,599

I've been through this error a lot of times, sigh...

Why does it happen?

Incorrect removal of software or parts of software can cause this problem,
in my case Microsoft Install Clean-Up Utility caused these problems...

This causes permissions of sub keys of Components to be set wrong.

Where does this happen in the registry?

HKEY_LOCAL_MACHINE
--> SOFTWARE
--> Microsoft
--> Windows
--> CurrentVersion
--> Installer
--> UserData
--> S-1-5-18
--> Components

How to fix this automatically?

http://support.microsoft.com/kb/313222

This might or might not work, try and see if it works in your case.

Another automatic attempt you could try is:

SubInAcl /subkeyreg HKEY_LOCAL_MACHINE /grant=administrators=f /grant=system=f
SubInAcl /subkeyreg HKEY_CURRENT_USER /grant=administrators=f /grant=system=f
SubInAcl /subkeyreg HKEY_CLASSES_ROOT /grant=administrators=f /grant=system=f
SubInAcl /subdirectories %SystemDrive% /grant=administrators=f /grant=system=f

You will need to obtain SubInAcl for that.

If one of these solutions worked for you, praise yourself lucky...

If not, sigh...

How to fix this manually?

The annoying thing to fix this manually is that permissions are not applied recursive in that folder, whatever you try to do you will need to apply the permission changes more than once in order for the permissions to propagate properly.

You can try to do it but it did never work in my case...

  • Change the owner first, make sure the recursive thing is checked, apply, close it.
  • Then change the permissions, make sure the recursive thing is checked, read, apply, close it.

Process Monitor can help to indicate you what sub keys are still having problems, in this way you don't have to check the log over and over again to see where it still goes wrong. Just reset the filter and then make sure you filter every status except for ACCESS DENIED.

Clear the log and try again. For each key within Components that has permission problems, you will need to adjust the permissions as I described in the bulleted list so that they match the permissions of the Components key. You should then be able to click inside the key and it subkeys, if not, fix the permisiions for the subkeys too.

You will have to repeat this till it's fixed. Yes, it's annoying... :-(

Share:
6,599

Related videos on Youtube

Nathan Taylor
Author by

Nathan Taylor

I am software developer, primarily web, with experience in ASP.NET MVC, ASP.NET, PHP, Classic ASP, SQL, MySQL, C#, XHTML, CSS, JavaScript, JQuery and more. I have been building websites for about 10 years now, and I love it as much as the day I started. My greatest development philosophy is to strive to build highly functional and interactive applications which surpass expectations and are exciting to use. To see what I'm working on, take a look at my blog or my github. My professional CV can be found at: http://careers.stackoverflow.com/nathantaylor.

Updated on September 17, 2022

Comments

  • Nathan Taylor
    Nathan Taylor almost 2 years

    There's something funky going on with my Visual Studio installation and when I went to uninstall it so I could make a fresh install, I ran into problems with the uninstaller as well. When I select uninstall and run the setup wizard it attempts to uninstall for a few minutes before throwing an error and rolling back the setup.

    Here's the error log the setup is generating:

    [08/09/10,15:04:59] Microsoft Visual Studio 2008 Professional Edition - ENU: [2] ERROR:Error 1402.Could not open key: UNKNOWN\Components\27BE807B28AA7BE3B80B8D54AB539CD3\4E1DAD7D4F54B2B398A9AE271876CEF4.   Verify that you have sufficient access to that key, or contact your support personnel.
    [08/09/10,15:04:59] Microsoft Visual Studio 2008 Professional Edition - ENU: [2] ACTION FAILURE:Action ended 15:04:59: InstallFinalize. Return value 3.See MSI log for details.
    [08/09/10,15:05:10] Microsoft Visual Studio 2008 Professional Edition - ENU: [2] ACTION FAILURE:Action ended 15:05:10: INSTALL. Return value 3.See MSI log for details.
    [08/09/10,15:12:12] setup.exe: [2] ISetupComponent::Pre/Post/Install() failed in ISetupManager::InternalInstallManager() with HRESULT -2147023293.
    [08/09/10,15:12:24] VS70pgui: [2] DepCheck indicates Microsoft Visual Studio 2008 Professional Edition - ENU is not installed.
    [08/09/10,15:24:19] Microsoft Visual Studio 2008 Professional Edition - ENU: [2] ERROR:Error 1402.Could not open key: UNKNOWN\Components\27BE807B28AA7BE3B80B8D54AB539CD3\4E1DAD7D4F54B2B398A9AE271876CEF4.   Verify that you have sufficient access to that key, or contact your support personnel.
    [08/09/10,15:24:20] Microsoft Visual Studio 2008 Professional Edition - ENU: [2] ACTION FAILURE:Action ended 15:24:19: InstallFinalize. Return value 3.See MSI log for details.
    [08/09/10,15:24:31] Microsoft Visual Studio 2008 Professional Edition - ENU: [2] ACTION FAILURE:Action ended 15:24:31: INSTALL. Return value 3.See MSI log for details.
    [08/09/10,15:31:37] setup.exe: [2] ISetupComponent::Pre/Post/Install() failed in ISetupManager::InternalInstallManager() with HRESULT -2147023293.
    [08/09/10,15:32:20] VS70pgui: [2] DepCheck indicates Microsoft Visual Studio 2008 Professional Edition - ENU is not installed.
    

    Any advice as to how I can get Visual Studio 2008 off my Windows 7 64-bit system?

    • Diskilla
      Diskilla almost 14 years
      Have you tried using the visual studio repair installation?
    • Admin
      Admin almost 14 years
      Try to repair VS installation (run installer and select repair), then re-try uninstall.
    • Tamara Wijsman
      Tamara Wijsman almost 14 years
      I wish that would work, but a repair install isn't eligible to change the permission of the key.
    • Tamara Wijsman
      Tamara Wijsman almost 14 years
      I wish that would work, but a repair install isn't eligible to change the permission of the key...
    • Tamara Wijsman
      Tamara Wijsman almost 14 years
      Adjusted title and tags so it's easier to find this question.
  • Tamara Wijsman
    Tamara Wijsman almost 14 years
    This problem could have taken place far before the system restore allows him to ga back in time, and the tools provided in your link are a cause of this problem and will only make things worse in the long end. Fixing the permissions won't harm and allows him to uninstall it in the right way...
  • Nathan Taylor
    Nathan Taylor almost 14 years
    As TomWij commented, I don't have any way of tracking when the problem occurred so a system restore is a non-optimal solution. I also am not sure if it's even enabled on this machine. As for the link, I read through that yesterday and noticed it assumes that the uninstaller actually runs (first step of the process); my uninstaller gets half done then rolls itself back.
  • Nathan Taylor
    Nathan Taylor almost 14 years
    I managed to work around the problem that prompted me to want to uninstall in the first place, so I will save your answer and attempt to implement it at a later date. Presently, I have a working copy of Visual Studio and no longer need to uninstall. Still, the information is definitely valuable to me.
  • Tamara Wijsman
    Tamara Wijsman almost 14 years
    I had this problem when moving between various beta version of Visual Studio, it's more common to happen there but I have no clue why... It also occured to me when I was unable to remove Windows Live due to a non-related error, it caused me to use clean-up utility and brought me to the same problem there. Anyway, thanks for the upvote... I hope that people having the same problem find this answer through Google somehow, as it was hard to find a solution for this one.