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 or console programs including the Command Prompt can’t be launched, and running Sfc.exe from Windows isn’t possible. In such cases, Sfc.exe can be run offline via the Windows Recovery Environment (Windows RE) in all versions of Windows including Windows 10.
- Booting into Windows RE
- Running the System File Checker Offline
Part 1: Booting into Windows RE
Instructions for Windows 8 and 10
1. Press WinKey+X to open the Power User menu. 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
If Windows was installed in c:\ drive, then it’s usually D:\ when seen from Windows RE.. but it’s better to check it out using BCDEDIT.
(Now skip to Part 2 of the tutorial…)
Instructions for Windows Vista and 7
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
Part 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.
About the author
Ramesh Srinivasan founded Winhelponline.com back in 2005. He is passionate about Microsoft technologies and has a vast experience in Windows — delivering support for Microsoft's consumer products. He has been a Microsoft MVP (2003-2012) who contributes to various Windows support forums.