The sfc command is a Command Prompt command that can be used to verify and replace important Windows system files. Many troubleshooting steps advise the use of the sfc command.

System File Checker is a very useful tool to use when you suspect issues with protected Windows files, like many DLL files.

Sfc Command Availability

The sfc command is available from within the Command Prompt in most Windows operating systems, including Windows 11, Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, and Windows 2000.

System File Checker has been part of Windows Resource Protection since Windows Vista, and is sometimes referred to as Windows Resource Checker in those operating systems.

In Windows XP and Windows 2000, this tool is part of Windows File Protection.

Sfc Command Syntax

Its basic form, this is the syntax required to execute System File Checker options:

This command can only be run from the Command Prompt when opened as an administrator. See How to Open an Elevated Command Prompt for information on doing that.

The availability of sfc command switches may differ somewhat from operating system to operating system.

sfc options [=full file path]

Or, more specifically, this is what it looks like with options:

sfc [/scannow] [/verifyonly] [/scanfile=file] [/verifyfile=file] [/offbootdir=boot] [/offwindir=win] [/?]

Sfc Command Examples

Here are some examples of the different ways you can use this command:

You can save the output of the sfc command to a file using a redirection operator. See How to Redirect Command Output to a File for instructions—Command Prompt Tricks has more tips like this.

Scan and Replace All Corrupt Files

sfc /scannow

In the above example, the System File Checker utility is used to scan and then automatically replace any corrupt or missing system files. The /scannow option is the most commonly used switch for the sfc command.

See How to Use SFC /Scannow to Repair Protected Windows Operating System Files for more information on using the command in this way.

Repair a Specific File

sfc /scanfile=c:\windows\system32\ieframe.dll

The sfc command above is used to scan ieframe.dll and then repair it if an issue is found.

Scan a Different Windows Installation

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

In the next example, protected Windows files are scanned and repaired if necessary (/scannow) but this is done so with a different installation of Windows (/offwindir=c:\windows) on a different drive (/offbootdir=c:).

Scan Everything, But Don’t Repair

sfc /verifyonly

Using the sfc command with the /verifyonly option, System File Checker will scan all protected files and report any issues, but no changes are made.

The above example is how you would use the sfc command from the Command Prompt in System Recovery Options or from a different installation of Windows on the same computer.

The sfc command is often used with other Command Prompt commands, such as the shutdown command so that you can restart your computer after running System File Checker.

Depending on how your computer was set up, you may need access to your original Windows installation disc or flash drive to allow file repairs.

If Windows needs a copy of a file to replace the corrupt one with, it’ll get it from C:\Windows\WinSxS\Backup. If that source has been compromised, Windows will access the internet to download the correct files from Microsoft’s website.

See Microsoft’s piece on System File Checker for more information you may find useful.

Get the Latest Tech News Delivered Every Day

  • Scan and Fix Your Hard Drive: Windows System Files

  • How to Fix Kernelbase.dll Not Found or Missing Errors

  • How to Fix a Computer That Won’t Start in Safe Mode

  • How to Fix Vbscript.dll Not Found or Missing Errors

  • How to Fix Winusb.dll Not Found or Missing Errors

  • How to Fix Hid.dll Not Found or Missing Errors

  • Copy Command

  • Net Send Command

  • How to Fix Explorerframe.dll Not Found or Missing Errors

  • How to Fix Framedyn.dll Not Found or Missing Errors

  • How to Fix Crypt32.dll Not Found or Missing Errors

  • How to Fix Shdocvw.dll Not Found or Missing Errors

  • How to Fix Dxgi.dll Not Found or Missing Errors

  • How to Fix Rapi.dll Not Found or Missing Errors

  • How to Fix Propsys.dll Not Found or Missing Errors

  • How to Fix Jscript.dll Not Found or Missing Errors

  • Facebook

  • Twitter

Hit Refresh on Your Tech News

  • About Us

  • Privacy Policy

  • Editorial Guidelines

  • Terms of Use

  • Careers

  • Advertise

  • Contact

  • EU Privacy

  • NEWS

  • HOW TO

  • FEATURES

  • ABOUT US