Maintaining the health of your Windows operating system is crucial for a smooth and secure computing experience. Over time, system files can become corrupted or go missing, leading to system instability, errors, or unexpected behavior. Fortunately, Microsoft provides a built-in tool called System File Checker (SFC) designed to scan, identify, and repair corrupt or missing system files, helping you keep your Windows environment stable and reliable.
This article will guide you through the process of enabling and using the System File Checker, including essential preparatory steps involving the Deployment Image Servicing and Management (DISM) tool to address common pitfalls and ensure successful repairs.
What is the System File Checker (SFC)?
SFC is a command-line utility included in Windows (from Windows Vista onwards, including Windows 7, 8, 10, and 11) that scans all protected system files and replaces incorrect or corrupted versions with the correct Microsoft-provided copy stored in the system cache. This process allows you to fix operating system problems without the need to reinstall Windows.
Why You Should Run DISM Before Using SFC
In many scenarios, simply running the sfc /scannow command may not fix all issues due to a corrupted or outdated system file cache, also known as the Windows image or component store. This is where DISM comes into play.
DISM is a powerful tool that repairs and updates the Windows image, ensuring that the cached files SFC relies upon are intact and up to date. Running DISM before SFC increases the likelihood that SFC can successfully restore corrupted files.
Step-by-Step Guide to Enable and Use System File Checker
Step 1: Launch an Elevated Command Prompt
- Click the Start button or press the Windows key.
- Type
cmdorCommand Promptin the search box. - Right-click on Command Prompt in the search results and select Run as administrator.
- If prompted by User Account Control (UAC), click Yes to grant elevated privileges.
Step 2: Repair the Windows Image Using DISM
In the elevated Command Prompt, type the following command and press Enter:
DISM.exe /Online /Cleanup-image /Restorehealth
/Onlinetargets the currently running operating system./Cleanup-imageperforms cleanup and recovery operations on the image./Restorehealthscans the image for component store corruption and automatically fixes any issues detected.
Note: This process may take several minutes. Do not close the Command Prompt window until it finishes.

If your system has issues connecting to Windows Update or you want to use an alternative repair source (such as an ISO file or USB installation media), replace the above command with:
DISM.exe /Online /Cleanup-Image /RestoreHealth /Source:C:\RepairSource\Windows /LimitAccess
Replace C:\RepairSource\Windows with the location of your repair source.
Step 3: Run the System File Checker Scan
Once DISM completes successfully, in the same Command Prompt window, execute:
sfc /scannow
This command will begin a system-wide scan of all protected system files. If any are corrupted or missing, SFC will attempt to repair them automatically using the restored Windows image.
Important: Do not close the Command Prompt until the verification reaches 100%.
Step 4: Review the Scan Results
After the scan finishes, you will see one of several messages:
-
Windows Resource Protection did not find any integrity violations.
No corrupted or missing system files were detected. -
Windows Resource Protection found corrupt files and successfully repaired them.
Corrupted files were fixed; your system should function normally. -
Windows Resource Protection found corrupt files but was unable to fix some of them.
Some problems remain. You may need to manually replace the corrupted files or take further troubleshooting steps. -
Windows Resource Protection could not perform the requested operation.
Try running the scan in Safe Mode and ensure that required folders (likePendingDeletesandPendingRenames) exist in%WinDir%\WinSxS\Temp.
Optional: Manually Replace Corrupted Files
If SFC reports that it couldn’t repair certain files, you can manually replace them:
-
Find corrupted files details:
Execute this command to extract SFC logs:findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt" -
Open
sfcdetails.txtfrom your desktop to identify the specific corrupted files. -
Take ownership and grant full permissions to the corrupted file. Replace
<Path_And_File_Name>with the corrupted file’s path:takeown /f <Path_And_File_Name> icacls <Path_And_File_Name> /grant administrators:F -
Copy a known good file from another system or installation media:
copy <Source_File> <Destination>
Frequently Asked Questions (FAQs)
Can I run SFC without running DISM first?
Yes, but it is not recommended. Without repairing the Windows image using DISM first, SFC might not have a reliable source to restore corrupted files, causing scans to fail or repairs to be incomplete.
How long does the SFC scan take?
It usually takes between 5 to 15 minutes but can vary depending on your system’s speed and the extent of file issues.
Do I need internet access for these repairs?
DISM uses Windows Update as the default source to repair system files. If Windows Update is unavailable or corrupted, providing a local source (like an ISO file) is necessary.
Best Practices for Running System File Checker
- Always run Command Prompt as an administrator to ensure the necessary permissions.
- Run DISM first to repair the system image for reliable SFC operation.
- Avoid interrupting the scan processes to prevent partial repairs.
- Review the scan logs if issues persist.
- Use Safe Mode for running scans when the system is unstable.
- Backup critical data before performing system repairs.
Conclusion
Using the System File Checker combined with DISM is a powerful approach to maintain and restore Windows system integrity without resorting to complete reinstalls that can lead to data loss. Through a few careful command-line steps, you can resolve many underlying issues that cause system instability, freezes, or errors, thus extending your PC’s lifespan and performance.
Next time your Windows system behaves erratically or you receive system file errors, remember that the System File Checker is an excellent first line of defense to unlock and maintain your system’s integrity.
By following these clear and detailed steps, you can confidently enable and utilize the System File Checker to ensure a healthier Windows experience.
