Windows 7 SP1 fails to install with Code 0x800F0A13, 0x800F0826 or 0x80070003

Symptom:

When installing Windows 7 Service Pack 1 (SP1), you could possibly encounter errors 0x800f0a13, 0x80070003 or 0x800f0826.

The CBS logs is like below:

2011-02-23 08:32:18, Info CBS SPI: System falls between the SRCleanMin and SRPreserveMin bounds. All VSS snapshots will be deleted
2011-02-23 08:32:18, Error CBS SPI: (PerformSPInstallation:709)Failed SPC Lite UI hr=0x800f0a13
2011-02-23 08:32:18, Error CBS SPI: (wmain:1105)Failed to perform SP installation hr=0x800f0a13

Or

2010-11-07 13:09:52, Info CBS DriverUpdateUninstallUpdates failed [HRESULT = 0x80070003 - ERROR_PATH_NOT_FOUND]
2010-11-07 13:09:52, Error CBS Doqe: Failed uninstalling driver updates [HRESULT = 0x80070003 - ERROR_PATH_NOT_FOUND]
2010-11-07 13:09:52, Info CBS Perf: Doqe: Uninstall ended.
2010-11-07 13:09:52, Info CBS Failed uninstalling driver updates [HRESULT = 0x80070003 - ERROR_PATH_NOT_FOUND]
2010-11-07 13:09:52, Error CBS Shtd: Failed while processing non-critical driver operations queue. [HRESULT = 0x80070003 - ERROR_PATH_NOT_FOUND]
2010-11-07 13:09:52, Info CBS Shtd: Rolling back KTM, because drivers failed.

This is similar to the issue that we posted 4 monthes ago:

https://blogs.technet.com/b/asiasupp/archive/2010/11/23/win7-sp1-rc-install-failed-error-path-not-found-if-missing-certain-built-in-rtm-driver.aspx

Solution:

In most of cases, this issue is because the 3rd party driver clean software ( like DriverCleanerDotNet or Driver Sweeper utility from Phyxion ) was installed, and it made some changes to the system image.

Please follow the below steps to resolve it:

1. Run CheckSUR(KB947821).

https://support.microsoft.com/kb/947821

2. Follow the steps from Phyxion on properly restoring the drivers: https://forum.phyxion.net/viewtopic.php?id=17

3. Mount your Windows installation media to a folder

Extract and replace the %SystemRoot%System32DriverStoreFileRepository with the following folders:
atiilhag.inf_amd64_*
atiriol6.inf_amd64_*
nv_lh.inf_amd64_*

Extract and replace the %SystemRoot%winsxs with the following folders (x64):
amd64_atiilhag.inf.resources_*
amd64_atiilhag.inf_*
amd64_atiriol6.inf_*
amd64_nv_lh.inf.resources_*
amd64_nv_lh.inf_*

Extract and replace %SystemRoot%winsxsManifests with the following files:
amd64_atiilhag.inf-languagepack_*.manifest
amd64_atiilhag.inf.resources_*.manifest
amd64_atiilhag.inf_*.manifest
amd64_atiriol6.inf_*.manifest
amd64_nv_lh.inf-languagepack_*.manifest
amd64_nv_lh.inf.resources_*.manifest
amd64_nv_lh.inf_*.manifest

Note: these are the 64-bit version of the files. For the 32-bit version look for the x86 files. You also need to replace the permisions on above mentioned files and folders to be able to replace them.

4. Perform an inplace upgrade of Windows