The System File Checker (sfc.exe) is an useful tool that lets you scan the integrity of Windows system files, and repair corrupt or missing system files. Numerous cases have been resolved thus far by running Sfc.exe with the "scannow" parameter. However, there are situations where in a corrupt or missing system file prevents Windows from booting normally, and running Sfc.exe from Windows isn’t possible. In such cases, Sfc.exe can be run offline using two additional parameters, via the Windows Recovery Environment (Windows RE) in Windows 7 and Windows Vista.

Booting into Windows RE

Configure the boot order in the BIOS such that the first boot device is your CD/DVD drive.

Insert the Windows 7/Vista Setup DVD and restart the computer.

Alternately, you may use the Windows 7/Vista System Repair Disc if you have one.

When prompted, press a key to boot from the DVD. In the "Install Windows" screen, click Repair your computer

Select your Windows installation, and click Next

Editor’s Note: Make a note of the drive-letter of your Windows 7 installation, as seen from Windows RE. This is the drive-letter you want to reference when running Sfc.exe offline.

Click Command Prompt

To scan the integrity (and repair) a specific file, use this command:

sfc /scanfile=d:\windows\system32\zipfldr.dll /offbootdir=d:\ /offwindir=d:\windows

The above command scans the file zipfldr.dll and replaces it if required.

To scan the integrity of all system files and repair them, run this command:

sfc /scannow /offbootdir=d:\  /offwindir=d:\windows

This process takes some time (<5 min in my case) to complete, and there weren’t any integrity violations.


Related Posts


Email SubscriptionPrefer an E-mail subscription?

Enter your email address:

Delivered by FeedBurner

7 Comments

  1. John Dangerbrooks
    said this on Saturday, August 7th 2010 11:55 am

    There IS a way in Windows XP but not a SIMILAR way. I’m going to tell you about it but I won’t take responsibility if anything went wrong. Do it at your own risk.

    You must insert a Windows XP CD into your disc drive, boot from it and install a copy of Windows XP right over the existing copy.

    DO NOT tell the setup to FORMAT your hard disk. (Some people seem to think that to install Windows means to format the hard disk as well. WRONG!) Tell the setup to leave your file system intact.

    Ignore the warning that says “C:\My Documents” folder will be deleted. Windows XP does not have a “My Documents” folder at the root of drive C.

  2. Yutaka Y.
    said this on Friday, August 6th 2010 8:27 am

    I would very much like to know if there is any similar way for Win XP, as this is timely issue for me. I got my work laptop in front of me crashed yesterday…

  3. John Dangerbrooks
    said this on Friday, July 30th 2010 4:22 pm

    @Jan: Not a chance for Windows XP. Windows XP Recovery Console does not have a SFC command.

    @Jsmith: Don’t do it!

  4. Jan
    said this on Wednesday, July 28th 2010 12:23 pm

    Does the above apply for winXP ?

    How to do a similar thing in WinXP.

  5. said this on Wednesday, July 28th 2010 10:23 am

    @jsmith: The Windows 7 Setup DVD worked just fine to load Windows RE in Vista PC, and the SFC command worked fine.

  6. jsmith
    said this on Wednesday, July 28th 2010 5:44 am

    Question: Can a windows vista installation be repaired this way using a windows 7 install disc?

  7. said this on Wednesday, July 28th 2010 1:32 am

    [...] How to Run the System File Checker (Sfc.exe) Offline in Windows 7 and Vista [Winhelponline] Tagged:command linerepairsystem recoverytroubleshootingwindows [...]

Leave a Reply