Repair Windows 10 with System File CheckerSource: Windows Central

On Windows 10, when you start noticing random errors, problems booting up, or features not working as expected, there's a good chance that one or multiple system files might have gone missing or corrupted for unknown reasons. Usually, problems with system files could occur as a result of an issue installing a system update, driver, or application, or while making changes to the installation manually.

If you happen to come across this issue, you can use the Windows 10 System File Checker (SFC), which is a command-line tool designed to scan the integrity and restore missing or corrupted system files with working replacements.

In this Windows 10 guide, we'll walk you through the steps to use the System File Checker tool to repair damaged system files automatically or manually if the tool refuses to work.

Best VPN providers 2020: Learn about ExpressVPN, NordVPN & more

Warning: This is a friendly reminder that editing system files is risky, and it can cause irreversible damage to your installation if you don't do it correctly. It's recommended to make a temporary full backup of your PC before proceeding.

How to repair Windows 10 with SFC

To repair a Windows 10 installation using the SFC command tool, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to repair system files and press Enter:

    sfc /scannow

    Windows 10 SFC Scannow commandSource: Windows Central

  4. Confirm result:

    • Windows Resource Protection did not find any integrity violations – indicates that the system doesn't have any missing or corrupted files.
    • Windows Resource Protection could not perform the requested operation – indicates that a problem was detected during the scan, and an offline scan is required.
    • Windows Resource Protection found corrupt files and successfully repaired them. Details are included in the CBS.Log %WinDir%\Logs\CBS\CBS.log – indicates that SFC detected and was able to fix the problem.
    • Windows Resource Protection found corrupt files but was unable to fix some of them. Details are included in the CBS.Log %WinDir%\Logs\CBS\CBS.log – indicates that you have to repair the corrupted files manually.

Once you complete the steps, the System File Checker command will scan, detect, and try to fix problems with system files on Windows 10.

If the tool has detected an issue, it's recommended to run the command at least three times to ensure that all the problems have been corrected.

In the case that you're having other problems using the SFC tool, then use this guide to use the Deployment Image Servicing and Management (DISM) tool to repair the local Windows 10 image to allow the System File Checker to complete successfully.

Viewing SFC scan logs

To view the details stored in the CBS.Log file from an SFC scan, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command and press Enter:

    findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfclogs.txt"

    SFC log file on Windows 10 desktopSource: Windows Central

  4. Check the Windows 10 desktop for a "sfclogs.txt" file.
  5. Double-click the sfclogs.txt file to open it with the default text editor app.

    Windows 10 SFC log fileSource: Windows Central

After you complete the steps, the log file will reveal all the details of the scanned system files and information for files that couldn't be repaired. (This option is only available when performing a scan within Windows 10, not when performing an offline scan with Command Prompt.)

How to repair Windows 10 with SFC offline

To repair Windows 10 using SFC using the offline option, use these steps:

  1. Open Settings.
  2. Click on Update & Security.
  3. Click on Recovery.
  4. Under the "Advanced startup" section, click the Restart now button.

    Windows 10 Recovery settingsSource: Windows Central

  5. Click on Troubleshoot.

    Advanced Startup Troubleshoot optionSource: Windows Central

  6. Click on Advanced options.

    Advanced startup Advanced optionsSource: Windows Central

  7. Click on Command Prompt.

    Advanced startup Command Prompt optionSource: Windows Central

  8. Select your account.
  9. Confirm your password.
  10. Click the Continue button.
  11. Type the following command to start the diskpart tool and press Enter:

    diskpart

  12. Type the following command to identify the location for the Windows and System Reserved partitions and press Enter:

    list volume

  13. Confirm the current drive letter assignment for the System Reserved partition and Windows 10 partition, which is usually the volume with the largest size. For example, D and E.

    diskpart list volume commandSource: Windows Central

  14. Type the following command to exit diskpart and press Enter:

    exit

  15. Type the following command to run the System File Checker offline and press Enter:

    sfc /scannow /offbootdir=D:\ /offwindir=E:\Windows

    Windows 10 SFC Scannow command offlineSource: Windows Central

    In the command, we're using the /offboodir option to specify the drive letter of the System Reserved partition, which in this case is D. Also, in the /offwindir option specifies the location of the Windows 10 files, which in this case is E:\Windows.

  16. Click the X button to close Command Prompt.
  17. Click on Continue.

Once you complete the steps, the System File Checker command will fix any problem that it finds with system files on Windows 10.

How to repair Windows 10 manually without SFC

In the case that you've tried everything and the System File Checker isn't able to fix the damaged files, you may need to repair them manually.

Determining corrupted system files

To find out which system files you need to replace in Windows 10, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command and press Enter:

    findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfclogs.txt"

  4. Check the Windows 10 desktop for a "sfclogs.txt" file.

    SFC log file on Windows 10 desktopSource: Windows Central

  5. Double-click the sfclogs.txt file to open it with the default text editor app.

    Windows 10 SFC log fileSource: Windows Central

After you complete the steps, the log file will reveal all the details of the scanned system files and information for files that couldn't be repaired.

If the log file is very large, you can use the find option in the text editor, and look for the term: "Cannot repair member file" to identify the files that need replacing.

Repairing system files manually

To repair damaged system files in Windows 10 manually, use these steps:

Important: You may be able to find good working files to replace in your installation from another device running the exact edition and version of Windows 10. If you don't know the location of the damaged file, you may need to perform an online search with the information you obtained from the SFC log file.

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to take ownership of the corrupted files and press Enter:

    takeown /f C:\PATH\TO\FILE

    In the command, make sure to update the command with the path to the file that you're trying to fix.

    In this example, the command takes ownership of the "ActionCenter.dll" file:

    takeown /f C:\Windows\System32\ActionCenter.dll

  4. Type the following command to grant full administrator access to the corrupted file and press Enter:

    icacls C:\PATH\TO\FILE /Grant Administrators:F

    In the command, make sure to update the command with the path to the file that you're trying to fix.

    In this example, the command grants access to the "ActionCenter.dll" file:

    icacls C:\Windows\System32\ActionCenter.dll /Grant Administrators:F

    Windows 10 take ownership of system filesSource: Windows Central

  5. Type the following command to replace the corrupted files with a good-known version and press Enter:

    copy C:\PATH\TO\SOURCE\GOOD\FILE C:\PATH\TO\DESTINATION\BROKEN\FILE

    In the command, make sure to update the command with the source and destination paths to replace the corrupted file.

    Windows 10 replace corrupted file manuallySource: Windows Central

    Quick tip: If you get a message saying that the file can't be replaced because it's being used by another process, then either find and terminate the process or perform this task offline (referer to the previous steps above.).

    In this example, the command replaces the "ActionCenter.dll" file in the System32 folder:

    copy C:\Files\ActionCenter.dll C:\Windows\System32\ActionCenter.dll

  6. Type the following command to verify the integrity of the system files and press Enter:

    sfc /verifyonly

    Windows 10 SFC verifyonly commandSource: Windows Central

  7. (Optional) Type the following command to verify the integrity of the replacement file and press Enter:

    sfc /verifyfile=C:\PATH\TO\REPLACED\FILE

    In the command, make sure to update the command with the path of the file you replaced.

    In this example, the command verifies the integrity of the "ActionCenter.dll" file inside the System32 folder:

    sfc /verifyfile=C:\Windows\System32\ActionCenter.dll

Once you complete the steps, if the new files pass the integrity check, the problems you were having should be resolved.

If you're unable to repair the system using the System File Checker, then you may want to consider starting fresh with a clean installation of Windows 10.

More Windows 10 resources

For more helpful articles, coverage, and answers to common questions about Windows 10, visit the following resources: