How to Run the System File Checker (SFC) in Windows

Your Windows computer depends on operating system files to get the information it needs to run smoothly. But sometimes, these files can become corrupted or go missing from your PC, affecting your system negatively in various ways. For example, when something’s wrong with a critical system file, your computer might become slow or crash frequently.

An easy way to fix problematic system files is to use the System File Checker (SFC). This tool will scan your computer, check the integrity of each system file, and repair those that are damaged or missing.

4

Here’s what you need to know about running the SFC tool on Windows.

How to Run a System File Checker Scan on Windows

To use the SFC, you need to run a single command in Command Prompt. Here’s how:

If you’re unfamiliar with operating system files, please read our guide onwhat system files are on Windows. And to learn everything you need to know about Command Prompt, you can check out ourbeginner’s guide to Command Prompt.

A Black Windows Laptop On A Desk

What Happens After I Run the System File Checker?

After the System File Checker completes its scan, it will display a message in the Command Prompt window with the results.

If your system files are okay, you’ll see a message that says “Windows Resource Protection did not find any integrity violations.” If SFC found and fixed all problematic files, the message will read “Windows Resource Protection found corrupt files and successfully repaired them.”

Run Command Prompt Using Windows Search

On the other hand, if it found corrupted files but couldn’t repair any or all of them, the message will read “Windows Resource Protection found corrupt files but was unable to fix some of them.” And if SFC encounters a problem, the message will say “Windows Resource Protection could not perform the requested operation.”

Other SFC Commands You Can Run on Windows

TheSFC /scannowisn’t the only System File Checker Command you could run. Here are a couple more and what they do:

SFC Command

the results of an sfc scan in Command Prompt on Windows

Description

/verifyonly

cbs log file on Windows that has been opened in Notepad with the SR tag part showing

Run this command if you want SFC to check for problematic operating system files without fixing them.

Run this command if you want SFC to check a specific file for problems and fix it if it does have them. For example, Here’s the full command for checking and fixing theuser32.dllfile:SFC /scanfile=c:\windows\system32\user32.dll

/verifyfile

Run this command if you only want to check a particular system file for problems. Even if SFC finds an issue with the file, it will not repair it. For example, Here’s the full command for checking theuser32.dllfile:SFC /verifyfile=c:\windows\system32\user32.dll

/offbootdir

Run this command to tell the SFC which directory contains a bootable version of Windows. You need to do this every time you use the tool outside of Windows. For example, to select theE:drive on your PC, enter/offbootdir=e:\

/offwindir

Run this command to tell the SFC which folder in the directory — the one you specified with theSFC /offbootdircommand — contains Windows. For example, enter/offwindir=e:\windowsto tell the System File Checker that Windows is on theE:drive.

How to Run an Offline SFC Scan on Windows

There are a few scenarios that warrant the use of the SFC without logging into Windows. One such scenario is if the operating system files are so corrupted that Windows cannot start.

In that case, you can run SFC bycreating a bootable Windows disc or driveand using it to fix damaged system files. This is called an offline scan.

The important thing to remember about an offline scan is that you need to tell the SFC where to find Windows on the bootable drive. Here’s what a/scannowcommand would look like if you ran it offline:

That above command will tell SFC to look for Windows in theWindowsfolder on theD:drive. But keep in mind that the Windows version on the bootable media needs to be the same as the one installed on your PC for the scan and repair to be successful.

How to Find the SFC Log File On Windows

After the SFC does its thing, it will log the results of the scan and any repairs it made into a text file calledCBS.log. To open it, pressWin + Rto open Windows Run, enter the below text, and clickOK:

The CBS.log file contains other logs besides those from the System File Checker. When looking through the entries, look for those that have an[SR]tag on them. Each entry will contain the date and time of the scan, along with the details of what happened.

If you don’t want to bother with searching through theCBS.logfile for the entries with the[SR]tag, you can extract them to a file calledsfcdetails.txt. To do that, open Command Prompt as an administrator, and run the below command:

you’re able to findsfcdetails.txtby heading toThis PC > Local Disk (C:) > Windows > System32.

You’ll see that the log file contains entries from the System File Checker only.

If you’re doing an offline scan, you can enable logging by simply specifying the file path with the following command structure:

Just replaceoffline log file pathin the square brackets with the actual path you want to store the offline log file in the offline directory. Then, insert this entire command after the/windircommand when running an offline SFC scan.

Running the System File Checker, Demystified

We have only just begun to scratch the surface of what you can do with the System File Checker on Windows 10 and 11. However, now that you knowhow to run SFC(both in and out of Windows), you can use the tool effectively to troubleshoot problems with operating system files.

Using the SFC effectively is a necessary skill for every Windows user, and it’s just one of the many tools you can use to fix problems on your Windows computer.

Confused about CHKDSK, SFC, and DISM? Learn the difference between these three Windows diagnostic tools and when to use them.

Not Linux, not Windows. Something better.

My foolproof plan is to use Windows 10 until 2030, with the latest security updates.

Your phone’s camera app doesn’t show this, so it’s easy to miss.

Goodbye sending links via other apps.

Windows is great, but adding this makes it unstoppable.

Technology Explained

PC & Mobile