How to Run System File Checker (SFC) Offline in Windows 10 & Earlier

The System File Checker (sfc.exe) is a 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 the sfc.exe /scannow command.

However, there are situations wherein a corrupt or missing system file prevents Windows from booting normally, or prevents Command Prompt and console programs like Sfc.exe from being launched. In such cases, Sfc.exe can be run offline via the Windows Recovery Environment (Windows RE) in all versions of Windows including Windows 10.

Run the System File Checker (Sfc.exe) Offline in Windows

Step 1: Booting into Windows Recovery Environment

Instructions for Windows 8 and 10

  1. Right-click Start, click Shut down or sign out, press and hold the Shift key and click Restart. In Windows 10, you can also open Settings (WinKey + i), click Update and Security, click Recovery, and click the Restart Now button under Advanced startup.

    If Windows doesn’t start, then boot the system using the installation media or Recovery drive to access the Recovery Environment. In the Windows setup page that appears when booting using the Windows installation media, click Next and click Repair your computer.

  2. Click Troubleshoot
  3. Click Advanced options
  4. Click Command Prompt
  5. Use the BCDEDIT command to find the drive letter for your Windows installation, as seen from Windows RE.

    More information here.

    If Windows is installed in the C:\ drive, then it’s usually D:\ when seen from Windows RE. But it’s better to check it out using BCDEDIT.

    (Now, proceed to Step 2 of the tutorial…)

Instructions for Windows Vista and 7

  1. Configure the boot order in the BIOS such that the first boot device is your CD/DVD drive.
  2. 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.

  3. When prompted, press a key to boot from the DVD.
  4. In the “Install Windows” screen, click Repair your computer
  5. Select your Windows installation, and click Next.
    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.
  6. Click Command Prompt

Step 2: Running the System File Checker Offline

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

In this example, there weren’t any integrity violations. If there were any it would be displayed, and logged in CBS.log file. For some reason, in Windows 10, integrity violations weren’t logged when SFC was run in offline mode.

One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support, my reader. It won't take more than 10 seconds of your time. The share buttons are right below. :)

About the author

Ramesh Srinivasan founded back in 2005. He is passionate about Microsoft technologies and he has been a Microsoft Most Valuable Professional (MVP) for 10 consecutive years from 2003 to 2012.

19 thoughts on “How to Run System File Checker (SFC) Offline in Windows 10 & Earlier”

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

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

    @Jsmith: Don’t do it!

  3. 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…

  4. 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.

  5. To Andi:
    Correction: The “default drive” will, in fact,be whatever the windows RE maps it as. In many cases it will be D: as the RE maps c: to the hidden boot partition. As the editer noted: “Make a note of the drive-letter of your Windows 7 installation, as seen from Windows RE”

  6. When I enter “sfc \scannow” or any other command, it says: “There is a system repair pending which requires reboot to complete. Restart Windows and run sfc again.”
    Please help.
    Thanks in advance
    Sudhir Naik

  7. Sudhir, and those having similar problems… my advice is to do just that… restart and try again. Chances are you exited out of one of long, boring, and often useless “starup repair”s, and it’s waiting on you to finish it before starting anything else. If it lets you go through one of those and (most likely being the case) if it comes up with nothing, it should let you choose “advanced recovery options” as a text link in the bottom. It is at this point that you should be able to select “Command Prompt” from the bottom as seen in the picture above.

    If in the case I’m not at all correct (just working from memory, here), then I guess google is your friend… unless you’re against CISPA, then perhaps duckduckgo is your friend.

  8. What should I do if booth my boot directory and windows directory are on my c: partition?
    I tried: “sfc /scannow /offbootdir=c:\ /offwindir=c:\windows” , but nothing happens.

  9. Sorry it didn’t work: Windows Resources Protection could not start the repair service.

    It think it might have something to do with the drive letter where the OS is installed.

  10. And what about when the offline method from the DVD
    sfc /scannow /offbootdir=d:\ /offwindir=d:\windows
    reports Windows Resource Protection could not start the repair service.

  11. Does this use the install disc to copy the files from if the hd has no uncorrupted versions? That is what I am wanting as opposed to a repair install when there are just one or two bad files.

  12. after checking many sites and trying dozens of suggestions, this command saved my corrupted Windows 7 laptop: “sfc /scannow /offbootdir=d:\ /offwindir=d:\windows”


Leave a Comment