Vista sfc problem

Mark Phelps

Active Member
I have an "interesting" Vista sfc-related problem I'm trying to solve.

Have been running Vista Ultimate 32-bit since the days it came out with only a few minor problems. Then, last week, decided to "take the plunge" and install Service Pack 2. Mistake!

It failed with some error code I don't have handy right now. But that's not the issue. Spent the last week on the phone and remote-accessing with MS tech support who first tried it themselves (and yes, it failed for them, too), tried to remove SP 1 (that too, failed), and pressed me into buying a replacement DVD with SP 1 on it. Did a nondestructive reinstall using SP1 -- and it got all the way to stage 3 when it failed, saying it was reverting.

So, once back into Vista, ran scf /scannow -- which failed saying it can't fix some files.

Having made biweekly image backups, thought I would restore an old version and try that.

I'm now back to beginning of June, and sfc is failing with every restore!

When it failed initially (should have mentioned we ran it when MS was online initially), rebooted and got a chkdsk indicating that some Winsxs stuff was damaged, so I wasn't surprised that it failed.

I've since read about how I might be able to repair some of the files using the CBS log, but my more general question is about sfc -- isn't it simply supposed to work? And, if the saved version of the source file in the Winsxs directory is missing or corrupt, is there any way to run it, forcing it to use the DVD for the source files?

I really don't want to have to completely reinstall Vista from scratch!!
I already know how to use sfc in general, but have not been able to figure out a way to force it to use the Vista DVD for its source files.

The link you have is to the XP version, and in that case, the source files were stored on the CD in .CAB files. It was a relatively simple matter to use Expand to extract a file from a .CAB, write it to a directory, and replace the corrupted instance.

In Vista, the files are embedded in a Windows image (.wim) file -- which is something entirely different. You evidently have to install the WAIK in order to be able to examine the contents of a .wim file.

All I want to do is replace some corrupted files, but if the originals in the Winsxs directory are corrupted or missing, and I can't force it to read from the DVD, then I can't make sfc work.
Mark, you can try an offline scan of the system if you want, but if there's something it cant fix and SP installations are continually reverted I'm afraid a re-install may be needed.

To perform an offline scan:
Boot from a Vista DVD -> Repair my computer -> Next -> Command Prompt:

sfc /scannow /offbootdir=c:\ /offwindir=c:\windows\
Thanks. I've not had a chance to browse through the CBS.log file yet, but I'll try the offline approach. Maybe it will work.

BTW, I booted into the DVD and ran Startup Repair -- and it said nothing to repair. I clicked the item to open the log and all the actions showed as passed.
Startup repair fixes a copy of Windows that won't boot. Your copy is booting (just not working properly cause files are corrupted), so startup repair won't be able to help here.
OK, ran the sfc booting from the DVD -- and it fixed the files!! Got online and checked the cbs log, and it shows the fixed files and no other errors. So, it appears it worked!

Many thanks for your help.
If sfc's reporting no errors and SP2 is being offered to you via WUD you should be OK. If not try the standalone package.
If sfc's reporting no errors and SP2 is being offered to you via WUD you should be OK. If not try the standalone package.

Sorry I didn't get back sooner -- been busy.

SP2 was offered again, after the cleanup, and it installed OK this time.

So, I'm good to go.

Thanks again for the tips on using sfc.