Condividi tramite


Windows could not configure one or more system components: when upgrading from Windows 7 to Windows 8

Last weekend I wanted to upgrade my home workstation from Windows 7 Utimate to Windows 8 Professional, so that I could benefit from using the new Windows 8 Hyper-V client for my virtual machines.

I chose to do an in place upgrade from Windows 7 to Windows 8, as I had already done before on other machines, keeping all my applications and my documents. This process works very well, and even apps that would not install on Windows 8 migrate without any problems from Windows 7 to Windows 8.

But when I tried to upgrade to Windows 8 I had the following behavior:

  • I had the 'Installing Files _%' screen complete all the way to 100%
  • I had the 'Configuring Components _%' screen also complete all the way to 100%

Following this I received the following cryptic error message:

Windows could not configure one or more system components. To install Windows, restart the computer and then restart the installation.

Clicking OK would roll back the Windows 8 upgrade, reboot the machine and restore it to its previous Windows 7 self.

The rest of this article deals with the how and why you might get this behavior. If you are not interested in the nitty gritty, just go down to the solution part to fix it.

So what just happened?

After spending some time looking into the matter, I was able to find out that Windows keeps a setup log (which was expected) in which it logs all the operations it attempts during the in place upgrade. The log file can be found at the following location:

C:\$Windows.~BT\Sources\panther\setupact.log

The log is not appended to, so each new attempt to upgrade from Windows 7 to Windows 8 will wipe away the old log and create a new one in its place.

Towards the end of this log, I was able to find, towards the end of the log, information that the installer was trying to install IIS 8. Searching for system32\inetserv\iissetup.exe from the bottom of the file upwards should do the trick to help you find the line. If you inspect the log file around these lines, you will see the setup tries to perform several operations for the install of IIS, all of which fail, and then the installer decides to roll back the installation all together. Hence the 'system component' that could not be configured is IIS.

Now that we know this, the question becomes why does the configuration fail? Furthermore, I did not even have IIS installed on my machine, I only had Visual Studio 2010 for Windows Phone development installed. Hence, removing IIS from the machine was not possible, since there were no IIS components physically present.

The next thing to try is to install IIS on the machine and see if this fails. And indeed after going through the IIS setup via the Windows Package Manager (Control Panel – Turn Windows Components on and off interface) I was able to see that IIS installation was indeed failing, even when I tried to install under Windows 7.

What not many people know is that IIS relies on the Windows CBS – Component Based Setup and Servicing system, which is built into the OS, to install and uninstall packages. Basically, an IIS installation just asks CBS to deploy certain installation packages to the OS. The installer also keeps a detailed install log, which can be found here:

C:\Windows\IIS7.log

Contrary to the Windows 8 upgrade log, this log gets appended to, and will contain all installation and uninstallation attempts you perform in chronological order.

Looking through the log for the keyword <!!FAIL!!>, I was quickly able to spot information indicating that the instantiation of AESProvider had failed.

[04/05/2013 19:33:37] Set ACLs on NetFrameworkConfigurationKey
[04/05/2013 19:33:37] iisWasKey key container already exists
[04/05/2013 19:33:37] Created iisWasKey user key
[04/05/2013 19:33:37] iisConfigurationKey already exists
[04/05/2013 19:33:37] iisConfigurationKey already exists
[04/05/2013 19:33:37] < !!FAIL!! > Generating AesProvider (result=0x8009000d)
[04/05/2013 19:33:37] < !!FAIL!! > Install of component SharedLibraries result=0x8009000d
[04/05/2013 19:33:37] < !!FAIL!! > COMPONENT::ExecuteCommand result=0x8009000d

AES is an encryption provider that IIS uses to encrypt sensitive data in the configuration files using specific RSA machine keys from Windows.

If the machine keys that IIS uses to encrypt the configuration store using the AESProvider are somehow corrupted, then the provider instantiation will fail, and the install will fail. Since the Window 8 installer also tries to install IIS, and this fails, the upgrade fails and is rolled back.

The solution:

The RSA machine keys in Windows 7 and Windows 2008 are found at the following location:

C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys

The ACLs (access control lists) for the IIS keys are incorrect, hence the failure. The keys in question are the following (files starting with the numbers indicated and ending in the machine's GUID):

6de9cb26d2b98c01ec4e9e8b34824aa2_GUID iisConfigurationKey
d6d986f09a1ee04e24c949879fdb506c_GUID NetFrameworkConfigurationKey
76944fb33636aeddb9590521c2e8815a_GUID iisWasKey

The easiest solution is to remove the files from the folder, as new ones will be re-created the next time you try and install IIS. This allows the IIS installation to succeed, and hence, it allows the upgrade to complete successfully.

By Paul Cociuba
www.linqto.me

Comments

  • Anonymous
    May 15, 2013
    The comment has been removed

  • Anonymous
    September 18, 2013
    es lo mismo que me pasa a mi marchano nose como hacer eso pudiste encontrar una solucion me gustaria que alguien me ayudara porfavor  

  • Anonymous
    November 16, 2013
    The comment has been removed

  • Anonymous
    December 24, 2015
    I've been trying to do a Windows 10 upgrade for weeks now. This was the solution. Thanks very much for the detective work and for publicly providing the information!!

    • Anonymous
      January 03, 2017
      Happy to be of service. Interesting to know that this is still hindering the upgrade process even to Windows 10.Paul
      • Anonymous
        May 19, 2017
        I am facing the same problem, should I off the system and start over or what is the first step to fix this problem? Should I click on Ok and continue or what?
        • Anonymous
          October 03, 2017
          The easiest is to start over with a clean system. This would help you avoid any other configurations that may remain behind when you upgrade.
  • Anonymous
    November 18, 2016
    The comment has been removed

    • Anonymous
      January 03, 2017
      Hello Rajesh,You seem to not be hitting the same issue I was seeing. Remember, the article shows that this is an issue when upgrading from Windows 7 to Windows 8. This would be the equivalent of upgrading a Windows 2008 R2 Server installation to Windows 2012 Server. In your case you are installing from scratch. You might consider opening a support case for this. Best of luck.Paul