In this article we will talk about Component Store in Windows 8 and some scenarios of its repair. It is to be recalled that starting from Windows Vista, Microsoft introduced a concept of component based servicing. The component structure allowed to make more stable the installing / removing updates, security patches and service packs. Windows 8 architecture is also based on the same system. The files of Windows Component Store are located in the \Windows\WinSxS folder, having the property with time to grow significantly in size (for more details on why the size of this folder increases with time and how to shrink it, refer to this article).
However, in some cases the Component Store can be damaged that results in troubles when trying to install Windows updates or other Microsoft apps. To repair the Component Store in previous Windows versions (Windows Vista, Windows 7, Windows Server 2008 /R2), Microsoft has created a special utility – CheckSUR (System Update Readiness Tool – KB947821). This utility is quite large (over 350 MB) and it is regularly updated with the release of new Windows updates.
What does this utility do? System Update Readiness Tool verifies the integrity of the following resources:
Files in these directories:
The contents of these registry branches:
- HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing
If CheckSUR detects some errors or incompatibilities, it will try to repair them.
The troubles with the Component Store can result in different errors during Windows update installation. Here’s the list of typical error codes, which are to be eliminated with this utility.
The list of Windows Update errors caused by the damage of the Component Store
|0×80070002||ERROR_FILE_NOT_FOUND||The system cannot find the file specified.|
|0x8007000D||ERROR_INVALID_DATA||The data is invalid.|
|0x800F081F||CBS_E_SOURCE_MISSING||The source for the package or file not found.|
|0×80073712||ERROR_SXS_COMPONENT_STORE_CORRUPT||The component store is in an inconsistent state.|
|0x800736CC||ERROR_SXS_FILE_HASH_MISMATCH||A component’s file does not match the verification information present in the component manifest.|
|0x800705B9||ERROR_XML_PARSE_ERROR||Unable to parse the requested XML data.|
|0×80070246||ERROR_ILLEGAL_CHARACTER||An invalid character was encountered.|
|0x8007370D||ERROR_SXS_IDENTITY_PARSE_ERROR||An identity string is malformed.|
|0x8007370B||ERROR_SXS_INVALID_IDENTITY_ATTRIBUTE_NAME||The name of an attribute in an identity is not within the valid range.|
|0x8007370A||ERROR_SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE||The value of an attribute in an identity is not within the valid range.|
|0×80070057||ERROR_INVALID_PARAMETER||The parameter is incorrect.|
|0x800B0100||TRUST_E_NOSIGNATURE||No signature was present in the subject.|
|0×80092003||CRYPT_E_FILE_ERROR||An error occurred while Windows Update reads or writes to a file.|
|0x800B0101||CERT_E_EXPIRED||A required certificate is not within its validity period when verifying against the current system clock or the time stamp in the signed file.|
|0x8007371B||ERROR_SXS_TRANSACTION_CLOSURE_INCOMPLETE||One or more required members of the transaction are not present.|
|0×80070490||ERROR_NOT_FOUND||Windows could not search for new updates.|
In Windows 8 and Windows Server 2012 functional equivalent of CheckSUR utility is already integrated into the system and is called Inbox Corruption Repair. The Inbox Corruption Repair can work in two modes: background and manual. The background repair is run automatically if any errors occur when trying to install a Windows update. Then Windows automatically tries to repair a damaged component and reinstall the Windows Update package. If the automatic repair can’t solve the problem itself, the administrator can fix the errors manually. having recovered the operability of the Component Store. This can be done using DISM (the Dism /Online /Cleanup-Image command) or Powershell (the Repair-WindowsImage cmdlet).
To check the state of the Component Store, open the elevated command line and run:
Dism /Online /Cleanup-Image /CheckHealth
- Unlike other Windows tools, DISM is case-sensitive.
- The command Dism /Cleanup-Image keeps logs in the following files: C:\Windows\Logs\CBS\CBS.log and C:\Windows\Logs\DISM\dism.log
The same Powershell command is:
Repair-WindowsImage -Online -CheckHealth
Performing CheckHealth takes a few minutes. As you can see, the current state of the component store in the image is Healthy, i. e. it doesn’t need a repair.
If any problems or errors are detected, you have to run the repair of the Store using the command:
Dism.exe /Online /Cleanup-Image /Restorehealth
The same Powershell command is:
Repair-WindowsImage -Online -RestoreHealth
In this case the system files have been successfully recovered:
If the system wasn’t able to repair some of the components in the Store, you may need Windows 8 installation disk. Insert disk into your DVD-ROM or mount its ISO-image. Suppose, the letter G has been assigned to the distribution disk. Let’s display the list of available Windows 8 versions on the disk using the PoSH command:
Get-WindowsImage -ImagePath G:\sources\install.wim
In this example we can see that there is only one image (Windows 8 Pro) with the index 1 (Index: 1) on the disk.
The following command start the storage recovery with the replace of the damaged components from the original Windows 8 image:
Repair-WindowsImage -Online -RestoreHealth -Source G:\sources\install.wim:1
After the repair is over, make sure that the Component Store is healthy.
The next (optional) step is to check the integrity of system files with the command: