System Use System File Checker (SFC) to Repair System Files in Windows 11


  • Staff
SFC_banner.png

This tutorial will show you how to run the System File Checker (SFC) tool to repair missing, corrupted, and modified system files in Windows 10 and Windows 11.

System File Checker (SFC) is a tool built into Windows that will check for system file corruption.

The SFC /SCANNOW command scans and verifies the integrity of all protected system files and replaces missing or corrupted versions with correct versions when possible. If this command discovers that a protected file has been overwritten, it retrieves the correct version of the file from the Windows image component store, and then replaces the missing or corrupted file.

Reference:


If you get a Windows Resource Protection Could Not Start the Repair Service error when trying to run SFC, make sure the Windows Modules Installer service is enabled and set to manual, and try again.



Contents





Option One

Run SFC /SCANNOW command in Windows 11


You must be signed in as an administrator to use this option.


1 Open an elevated Windows Terminal, and select Command Prompt or Windows PowerShell.

2 Copy and paste the sfc /scannow command into the elevated terminal, and press Enter. (see screenshot below)

3 When the scan is complete, hopefully you will get a Windows Resource Protection did not find any integrity violations message indicating you do not have any missing or corrupted system files.

If you get a Windows Resource Protection found corrupt files but was unable to fix some of them. type message, then:

Run the command again to see if it may be able to the next time. Sometimes it may take running the sfc /scannow command up to 3 times with Fast Startup turned off and restarting the computer after each time to completely fix everything it's able to.

If not, then run the Dism /Online /Cleanup-Image /RestoreHealth (requires Internet connection) command to repair any component store corruption, restart the computer afterwards, and try running the sfc /scannow command again.

If still not, then do a system restore using a restore point dated before the system file problem occurred to fix it. You may need to repeat doing a system restore until you find a older restore point that may work.

If still not, and you would like to get help with your SFC issue before continuing with more drastic measure below, then you could upload and attach your sfcdetails.txt file created using OPTION THREE below in a reply post in this tutorial.

If still not, then you could do a repair install of Windows 11 without losing anything.

If still not, then you could reset Windows 11.



sfc_scannow_command.png





Option Two

Run SFC /SCANNOW command in Command Prompt at Boot


1 Open a command prompt at boot.

2 Copy and paste the diskpart command into the command prompt at boot, and press Enter. (see screenshot below)

3 Copy and paste the list volume command into the command prompt at boot, and press Enter.

4 Make note of the offline boot directory (ex: recovery partition around 500 MB) drive letter (ex: "E") and Windows 11 drive letter (ex: "C").

5 Copy and paste the exit command into the command prompt at boot, and press Enter to exit diskpart.

6 Type the command below into the command prompt at boot, and press Enter.

sfc /scannow /offbootdir=<recovery partition drive letter>:\ /offwindir=<Windows drive letter>:\Windows

Substitute <recovery partition drive letter> in the command above with the offline boot directory (ex: recovery partition around 500 MB) drive letter (ex: "E") from step 4.

Substitute <Windows drive letter> in the command above with the Windows 11 drive letter (ex: "C") from step 4.

For example: sfc /scannow /offbootdir=E:\ /offwindir=C:\Windows


7 When the scan is complete, hopefully you will get a Windows Resource Protection did not find any integrity violations message indicating you do not have any missing or corrupted system files.

If you get a Windows Resource Protection found corrupt files but was unable to fix some of them. type message, then:

Run the command again to see if it may be able to the next time. Sometimes it may take running the sfc /scannow command up to 3 times with Fast Startup turned off and restarting the computer after each time to completely fix everything it's able to.

If not, then run the Dism /Online /Cleanup-Image /RestoreHealth (requires Internet connection) command to repair any component store corruption, restart the computer afterwards, and try running the sfc /scannow command again.

If still not, then do a system restore using a restore point dated before the system file problem occurred to fix it. You may need to repeat doing a system restore until you find a older restore point that may work.

If still not, and you would like to get help with your SFC issue before continuing with more drastic measure below, then you could upload and attach your sfcdetails.txt file created using OPTION THREE below in a reply post in this tutorial.

If still not, then you could do a repair install of Windows 11 without losing anything.

If still not, then you could reset Windows 11.



sfc_scannow_command_prompt_at_boot.png





Option Three

View SFC Scan Details from CBS.LOG


When SFC runs from within Windows, it logs its actions into the C:\Windows\Logs\CBS\CBS.log file with [SR] tags.

This option creates a sfcdetails.txt file on your desktop that shows you only the specific SFC details from the huge CBS.log.

SFC logging in the CBS.log file is not supported when running SFC at boot (offline) in Option Two.


1 Open Windows Terminal, and select Command Prompt or Windows PowerShell.

2 Copy and paste the appropriate command below into the terminal, and press Enter. (see screenshotd below)

(Command Prompt)​
findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"

SFC_scan_results_command.png

OR​

(Windows PowerShell)​
(sls [SR] $env:windir\Logs\CBS\CBS.log -s).Line >"$env:userprofile\Desktop\sfcdetails.txt"

SFC_scan_results_PowerShell.png

3 You can now close Windows Terminal if you like.

4 Open the sfcdetails.txt file created on your desktop to see only the SFC scan details from the CBS.log file.

The sfcdetails.txt file contains details from every time that the System File Checker tool has been run on the computer. The file includes information about files that were not repaired by the System File Checker tool. Verify the date and time entries to determine the problem files that were found the last time that you ran the System File Checker tool.


5 The sfcdetails.txt file uses the following format:

Date/Time SFC detail The following sample log file contains an entry for a file that could not be repaired: 2007-01-12 12:10:42, Info CSI 00000008 [SR] Cannot repair member file [l:34{17}]"Accessibility.dll" of Accessibility, Version = 6.0.6000.16386, pA = PROCESSOR_ARCHITECTURE_MSIL (8), Culture neutral, VersionScope neutral, PublicKeyToken = {l:8 b:b03f5f7f11d50a3a}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing


That's it,
Shawn Brink


 

Attachments

  • sfc.png
    sfc.png
    11.1 KB · Views: 184
Last edited:
Hey Brink,
Been having issues opening games recently, now one game just will not open or work at all even with launcher and anticheat reinstallation.
Game launcher tells me it blocked file "C:\Windows\System32\opengl32.dll". Now with the reason for my digging out of the way, I have done multiple sfc scans, all showing Windows Resource Protection found corrupt files but was unable to fix some of them. Done the Dism /Online /Cleanup-Image /CheckHealth command multiple times. Dism command tells me no component store corruption detected, but sfc scan directly after that still tells me that it found corrupt files and was unable to fix them. I have attached my sfcdetails but if I am honest I don't understand anything it says in there. Any suggestions?
 

Attachments

  • sfcdetails.txt
    321.4 KB · Views: 24

My Computer

System One

  • OS
    Windows 10 Pro
Did you run that Dism command whilst you were connected to the internet?

Your SFC results do not show any errors in today's runs.

Errors were last detected in a 21st September run.
I suspect the component store or the SFC manifest was corrupt but, as I say, the problem appears to have been fixed.
Here are the error report entries from the posted SFCDetails file:
2023-09-21 22:21:53, Info CSI 000001c8 [SR] Repairing file \??\C:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\\OneDrive.lnk from store 2023-09-21 22:22:01, Info CSI 0000020d [SR] Repairing file \??\C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\\mscormmc.dll from store 2023-09-21 22:22:02, Info CSI 00000221 [SR] Repairing file \??\C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\\mscormmc.dll from store 2023-09-21 22:22:02, Info CSI 00000222 [SR] Repairing file \??\C:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\\OneDrive.lnk from store 2023-09-21 22:22:02, Info CSI 0000022b [SR] Verify and Repair Transaction completed. All files and registry keys listed in this transaction have been successfully repaired
Notice the irrational \\ in the paths.



Denis
 
Last edited:

My Computer

System One

  • OS
    Windows 11 Home x64 Version 22H2 Build 22631.3155
Did you run that Dism command whilst you were connected to the internet?

I suspect the conent store is corrupted. Here are the relevant entries from the posted SFCDetails file:
[tbd]


Denis
Yes I did run it connected to the internet
 

My Computer

System One

  • OS
    Windows 10 Pro
Yes I did run it connected to the internet
So that was probably what fixed the fault and resulted in no errors being detected since the 21st.


All the best,
Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 22H2 Build 22631.3155
So that was probably what fixed the fault and resulted in no errors being detected today.


All the best,
Denis
But my sfc scan still says that there are corrupt files, as well as the problem with opening the game also continuing
 

My Computer

System One

  • OS
    Windows 10 Pro
Please would you post a screenshot of the SFC command you used & the on-completion message telling you there were errors.

Is it possible that your SFCDetails file has been corrupted i.e. that some of its contents have accidentally been deleted?
Try extracting its results again.


Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 22H2 Build 22631.3155
Please would you post a screenshot of the SFC command you used & the on-completion message telling you there were errors.

Is it possible that your SFCDetails file has been corrupted i.e. that some of its contents have accidentally been deleted?
Try extracting its results again.


Denis
I don't think it is possible that any contents of the sfcdetails could have been deleted since I only learned how to open that today.
 

Attachments

  • Screenshot (107).png
    Screenshot (107).png
    9.8 KB · Views: 40
Last edited:

My Computer

System One

  • OS
    Windows 10 Pro
I'm really sorry but I do not know what might fix this fault. I cannot understand it.
I assume you are using a normal Windows version and not any Insider version.

If this happened to me, I'd run a Repair install [aka In-place upgrade] but only because I could not think of anything else to do.
Repair Install Windows 11 with an In-place Upgrade - ElevenForumTutorials


Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 22H2 Build 22631.3155

My Computer

System One

  • OS
    Windows 10 Pro
You are in ElevenForum.
I assumed you had Windows 11 and have only now realised that you have Windows 10.

These topics are the same in both versions [because Windows 11 is, in essence, Windows 10 + a different Start menu + a different Taskbar + some new built-in apps].
SFC - TenForumsTutorials
Repair Install - TenForumsTutorials

If a Repair install does not fix the problem,
1 Create a thread of your own in TenForums to seek assistance - my ditty - ask a question [post #17] - TenForums
2 Run the command WinVer and post the Version & Edition you have
3 Come back here and paste in a link to your new thread so I can follow it. I expect others will also want to do so.


Best of luck,
Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 22H2 Build 22631.3155
But don't understand the first sentence in all three options.
Had a computer for 20 years and never had cause to learn that.
 

My Computer

System One

  • OS
    Windows 11 Home. Win Version 22H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP
    Hard Drives
    windows C Drive
    D Drive is SSD
    Browser
    Chrome
But don't understand the first sentence in all three options.
Had a computer for 20 years and never had cause to learn that.


In the Taskbar search box, type: cmd
Right click on Command Prompt and choose Run as Administrator.

In the command prompt window, type: sfc /scannow
 

My Computers

System One System Two

  • OS
    Win 11 Home ♦♦♦22631.3155 ♦♦♦♦♦♦♦23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Built by Ghot® [May 2020]
    CPU
    AMD Ryzen 7 3700X
    Motherboard
    Asus Pro WS X570-ACE (BIOS 4702)
    Memory
    G.Skill (F4-3200C14D-16GTZKW)
    Graphics Card(s)
    EVGA RTX 2070 (08G-P4-2171-KR)
    Sound Card
    Realtek ALC1220P / ALC S1220A
    Monitor(s) Displays
    Dell U3011 30"
    Screen Resolution
    2560 x 1600
    Hard Drives
    2x Samsung 860 EVO 500GB,
    WD 4TB Black FZBX - SATA III,
    WD 8TB Black FZBX - SATA III,
    DRW-24B1ST CD/DVD Burner
    PSU
    PC Power & Cooling 750W Quad EPS12V
    Case
    Cooler Master ATCS 840 Tower
    Cooling
    CM Hyper 212 EVO (push/pull)
    Keyboard
    Ducky DK9008 Shine II Blue LED
    Mouse
    Logitech Optical M-100
    Internet Speed
    300/300
    Browser
    Firefox (latest)
    Antivirus
    Bitdefender Internet Security
    Other Info
    Speakers: Klipsch Pro Media 2.1
  • Operating System
    Windows XP Pro 32bit w/SP3
    Computer type
    PC/Desktop
    Manufacturer/Model
    Built by Ghot® (not in use)
    CPU
    AMD Athlon 64 X2 5000+ (OC'd @ 3.2Ghz)
    Motherboard
    ASUS M2N32-SLI Deluxe Wireless Edition
    Memory
    TWIN2X2048-6400C4DHX (2 x 1GB, DDR2 800)
    Graphics card(s)
    EVGA 256-P2-N758-TR GeForce 8600GT SSC
    Sound Card
    Onboard
    Monitor(s) Displays
    ViewSonic G90FB Black 19" Professional (CRT)
    Screen Resolution
    up to 2048 x 1536
    Hard Drives
    WD 36GB 10,000rpm Raptor SATA
    Seagate 80GB 7200rpm SATA
    Lite-On LTR-52246S CD/RW
    Lite-On LH-18A1P CD/DVD Burner
    PSU
    PC Power & Cooling Silencer 750 Quad EPS12V
    Case
    Generic Beige case, 80mm fans
    Cooling
    ZALMAN 9500A 92mm CPU Cooler
    Mouse
    Logitech Optical M-BT96a
    Keyboard
    Logitech Classic Keybooard 200
    Internet Speed
    300/300
    Browser
    Firefox 3.x ??
    Antivirus
    Symantec (Norton)
    Other Info
    Still assembled, still runs. Haven't turned it on for 13 years?

    http://www.xtremesystems.org/forums/showthread.php?183088-5000-B-E-on-M2N32-SLI-Dlx-Overclocked&p=2891724#post2891724
But don't understand the first sentence in all three options.
Had a computer for 20 years and never had cause to learn that.
Which do you mean?
You must be signed in as an administrator to use this option.
1 Open an elevated Windows Terminal, and select Command Prompt or Windows PowerShell

If you mean that you do not understand administrator then click on it - it's a link to an explanation.
If you mean that you do not understand elevated Windows Terminal then click on it - it's a link to an explanation.


Best of luck,
Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 22H2 Build 22631.3155

Latest Support Threads

Back
Top Bottom