ThisCalculator

Everyday

Run SFC Command to Repair System Files in Windows 10

Updated · Standard formula, shown below

Run SFC Command to Repair System Files in Windows 10

Yes, you can run the System File Checker (SFC) command in Windows 10 to scan for and repair corrupted or missing system files. This built-in tool is often the first step in fixing crashes, blue screen errors, or application failures caused by damaged Windows components.

What Is SFC and Why Does It Matter?

System File Checker (SFC) is a command-line utility included with Windows 10. It checks the integrity of protected system files, such as DLLs, executables, and drivers, by comparing them against cached copies in the Windows component store. If it finds a mismatch, it replaces the corrupted file with a known-good version. This is important because system file corruption can cause a wide range of issues—from random app crashes to a completely unbootable system—even if you never notice the damage.

How to Run SFC in Windows 10

To run SFC, you need to open an elevated Command Prompt. Here are the steps:

  1. Click the Start button, type cmd, right-click Command Prompt in the results, and select Run as administrator.
  2. If a User Account Control prompt appears, click Yes.
  3. In the Command Prompt window, type sfc /scannow and press Enter.
  4. Wait for the scan to complete. This can take 10–30 minutes depending on your system speed and hard drive.
  5. When finished, you will see one of three messages: “Windows Resource Protection did not find any integrity violations,� “Windows Resource Protection found corrupt files and successfully repaired them,� or “Windows Resource Protection found corrupt files but was unable to fix some of them.�

If you get the third message, you may need to run the Deployment Imaging Service and Management Tool (DISM) first, then run SFC again. DISM repairs the component store that SFC relies on.

What Does SFC Actually Do?

SFC works by scanning all protected system files and checking their digital signatures. It compares each file’s hash against the expected hash stored in the Windows component store. If a file is missing or doesn’t match, SFC pulls the correct version from the component store (usually located at C:\Windows\WinSxS) and replaces the bad file. It also logs the results in the CBS log file (C:\Windows\Logs\CBS\CBS.log), which you can view for detailed information about what was found and repaired.

Common SFC Errors and How to Fix Them

Sometimes SFC itself fails. Here are the most common issues and what to do:

  • “Windows Resource Protection could not perform the requested operationâ€�: This usually means you didn’t run the command as administrator, or the Windows Modules Installer service is disabled. Reopen Command Prompt as admin and make sure the service is set to automatic.
  • “Windows Resource Protection found corrupt files but was unable to fix some of themâ€�: This often means the component store is also corrupted. Run DISM /Online /Cleanup-Image /RestoreHealth first, then run sfc /scannow again.
  • Scan hangs at a certain percentage: This can happen if another process is using system files. Try running SFC in Safe Mode, or temporarily disable your antivirus (though this is rarely the cause).
  • “Windows Resource Protection could not start the repair serviceâ€�: This indicates a problem with the Windows Modules Installer service. Check the service status in services.msc and set it to manual or automatic, then restart.

SFC vs. DISM: Which Should You Use?

SFC and DISM are complementary tools. SFC repairs system files using cached copies, while DISM repairs the component store itself—the source that SFC relies on. If SFC fails to repair files, it’s often because the component store is damaged. In that case, run DISM first:

  1. Open Command Prompt as administrator.
  2. Type DISM /Online /Cleanup-Image /RestoreHealth and press Enter.
  3. Wait for the scan to complete (usually 10–20 minutes).
  4. Restart your PC, then run sfc /scannow again.

If DISM also fails, you may need to use the /Source parameter to point to a Windows installation media (e.g., a USB drive) as a repair source. This is more advanced but often fixes stubborn corruption.

When Should You Run SFC?

You should consider running SFC if you experience any of the following:

  • Blue Screen of Death (BSOD) errors, especially ones mentioning system files or drivers.
  • Applications crash or fail to start with “missing DLLâ€� or “entry point not foundâ€� errors.
  • Windows Update fails repeatedly with error codes like 0x80070005 or 0x800F081F.
  • Your system becomes unstable after a crash, power outage, or malware infection.
  • You recently restored your system from a backup and suspect file corruption.

It’s also a good idea to run SFC proactively after a major Windows update, as updates can occasionally leave files in an inconsistent state.

Limitations and What SFC Cannot Fix

SFC is powerful but not a silver bullet. It cannot fix:

  • Hardware failures (e.g., failing RAM or hard drive).
  • Malware infections—run a dedicated antivirus or anti-malware tool instead.
  • Corrupted user profile data or registry hives.
  • Third-party driver issues—use Device Manager to update or reinstall drivers.
  • Problems with the Windows registry—use System Restore or a registry cleaner (though the latter is rarely recommended).

If SFC finds no issues but your problems persist, look elsewhere: check disk health with chkdsk /f /r, update drivers, or consider a repair install using the Windows 10 installation media.

Frequently Asked Questions

How long does sfc /scannow take?

A typical scan takes 10–30 minutes. On a slow hard drive or a system with many files, it can take up to an hour. If it runs for more than an hour with no progress, try restarting and running it in Safe Mode.

Can I use my computer while SFC is running?

It’s best to avoid using your computer during the scan. Running other programs can interfere with the scan and cause SFC to report false positives or hang. Close all applications and let it finish.

Does SFC work in Safe Mode?

Yes, you can run SFC in Safe Mode. This can be helpful if the scan hangs due to background processes. To boot into Safe Mode, hold Shift while clicking Restart, then navigate to Troubleshoot > Advanced Options > Startup Settings > Restart, and press 4 or F4.

Will SFC delete my personal files?

No. SFC only replaces protected system files. It does not touch your documents, photos, or other user data. However, it’s always wise to back up important files before running any system repair tool.

What if SFC can’t fix the corruption?

If SFC fails to repair files even after running DISM, you may need to perform a repair install (also called in-place upgrade) using the Windows 10 installation media. This reinstalls Windows while keeping your files and apps. If that fails, a clean install is the last resort.

Is there a way to see what SFC repaired?

Yes. Open the CBS log file at C:\Windows\Logs\CBS\CBS.log with Notepad. Search for “Cannot repair� or “Repaired� to see which files were fixed or left unresolved. The log is verbose, so you may want to filter it using PowerShell or a text editor’s search function.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.