The other day, we had a Vista Service Pack 1 notebook dropped off just to have Service Pack 2 installed.  We ran through some basic hardware tests, and virus scans to make sure things were ok; the problem was error code 0x80073712 which means “CBS manifest is corrupted.”  So we ran through the System Readiness Tool, and SFC, fixing all those errors.  Afterward, the Service pack installer was still throwing 0x80073712.  So I started looking through the cbs.log and noticed there was an error stating “MissingFileSystemResource” and pointing to a specific file in c:windowswinsxs.  So I replaced the file from a known good copy of Winsxs, backed up the CBS log, and reran the SP installer; it failed again, but this time the CBS log pointed to a different missing file.

Being the semi-lazy when it comes to repeating a process over and over, I wrote a basic batch file to find the missing file from CBS.log, delete the cbs log, and run the service pack installer.  Here it is (make sure to turn off UAC, to simply the process):

@echo off

findstr /c:"MissingFileSystemResource"


del %windir%logscbscbs.log

pathToSp2Installersp2.exe /unattend

So after running this script and replacing problem 15-20 missing files, the service pack installer started to reboot the system like normal; during the reboot, it would get to “Stage 1 of 3” and fail at 4%; the new error was 0x80070002 “Error_File_Not_Found,” when it booted back to Windows.  I checked the CBS log again for guidance on the missing file, but there was no indicator of thie missing file.  So I started poking around looking for something wrong.  After blinding paging through many many pages of, I found an error pointing to a missing file in c:windowswinsxs.  This time, I replaced the missing file with a known good, backed up and reran the service pack installer.  The installer rebooted and failed in the same place; once back in Windows, I searched for the word “fail” and quickly found another single reference to a missing file.  So again, the missing file got replace, got erased, and the installer reran.  This process went on for two or three more files, before I had to leave for the day. 

I, later, realized the easier way to figure out the missing files would have been to compare this corrupt Winsxs, to a known good Vista SP1 winsxs with something like comp.exe or Winmerge.  So in preparation to test my new idea, I used tree on a Vista SP1 virtual machines and redirected the results into a text file.

tree /f /a c:windowswinsxs > c:WinsxsSp1.txt

Sadly, before I could test my new process the machine was already started on an OS reload.  So this idea remains unverified.

The Vista SP1 text document is here.