|  |  |  |  |  |  |  |  |  |  | 

How To Repair Windows System Files with SFC /Scannow Command

When you have problems starting your Windows laptop, get odd errors, or functions don’t operate properly, there’s a significant probability that certain system files are broken or missing for unexplained reasons. Typically, issues with system files occur after installing a cumulative update, driver, or performing manual installation adjustments.

Whatever the cause, if you run into any problems, Windows 10 provides the System File Checker (SFC), a command-line utility intended to examine the integrity of system files and replace missing or damaged ones with functioning replacements.

In this Windows 10 instruction, we will show you how to utilize the System File Checker tool to automatically or manually restore broken system files.

 

How to repair Windows 10 with System File Checker

Warning: This is a gentle warning that altering system files is dangerous, and if done incorrectly, it might cause irrevocable harm to your installation. Before starting, it is advised that you create a temporary complete backup of your PC.

To fix a Windows 10 installation using the System File Checker utility, follow 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 the Windows 10 system files and press Enter:sfc /scannow
  4. Confirm the command results:
    • Windows Resource Protection did not find any integrity violations – indicates that the system does not have any corrupted or missing files.
    • Windows Resource Protection could not perform the requested operation – indicates a problem 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 the tool detected problems and was able to fix them.
    • 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 you may need to repair the corrupted files manually.

After you complete the procedures, the SFC command-line tool in Windows 10 will scan, identify, and fix any system file errors.

When the tool discovers a problem, the command should be performed three times to confirm that all issues have been appropriately fixed.

If you run into problems when using the program, use this tutorial to fix the local Windows 10 image files using the Deployment Image Servicing and Management (DISM) tool, enabling SFC to finish properly.

System File Checker 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 > C:\sfclogs.txt"
  4. Open File Explorer (Windows key + E).
  5. Click on This PC from the left pane.
  6. Under the “Devices and drives” section, open the Local Disk (the “C” drive).
  7. Double-click the sfclogs.txt file to open it with the default text editor app.

When you finish the procedures, the log file will show you all of the inspected system files as well as information about the unrepairable files.

This option is only accessible while scanning inside Windows 10, not when scanning offline using Command Prompt.

How to repair Windows 10 with System File Checker offline

How To Repair Windows System Files with SFC /Scannow Command
How To Repair Windows System Files with SFC /Scannow Command

To repair Windows 10 using SFC with 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.
  5. Click on Troubleshoot.
  6. Click on Advanced options.
  7. Click on Command Prompt. (After selecting the option, the device will reboot.)
  8. Select your account in the Advanced startup options.
  9. Confirm the account 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 determine the location of the Windows and System Reserved partitions and press Enter:list volume
  13. Confirm the current drive letter assignment for the System Reserved partition (the one close to 500MB) and Windows 10 partition, usually the volume with the largest size.
  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=F:\ /offwindir=C:\Windows
    In the command, we are using the /offboodir option to specify the drive letter of the System Reserved partition, which in this case is F. Also, the /offwindir option specifies the location of the Windows 10 files, which in this case is C:\Windows.
  16. Click the X button to close Command Prompt.
  17. Click on Continue.

Once you complete the steps, the command tool will fix any problems with system files on Windows 10, and the device will restart normally.

How to repair Windows 10 manually without System File Checker

How To Repair Windows System Files with SFC /Scannow Command
How To Repair Windows System Files with SFC /Scannow Command

If the System File Checker cannot fix the damaged files, you may need to repair them manually.

Determine corrupted system files

To find out which files need replacing on 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 > C:\sfclogs.txt"
  4. Open File Explorer (Windows key + E).
  5. Click on This PC from the left pane.
  6. Under the “Devices and drives” section, open the Local Disk (the “C” drive).
  7. Double-click the sfclogs.txt file to open it with the default text editor app.

After you finish the procedures, the log file will show all of the inspected system files as well as information about files that could not be fixed.

While in the file, use the text editor’s search feature (Ctrl + F) to seek for the words “Cannot repair member file” to discover the corrupted files that need to be replaced.

Repair system files manually

You may be able to get excellent functional files to replace in your installation from another device that is running the same edition and version of Windows 10. If you do not know where the damaged file is, you may need to do an internet search using the information in the SFC log file.

To repair damaged system files on Windows 10 manually, 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 take ownership of the corrupted files and press Enter:takeown /f C:\PATH\TO\FILEIn the command, replace C:\PATH\TO\FILE with the actual path to the file that you are trying to fix.This example takes ownership of the “acproxy.dll” file:takeown /f C:\Windows\System32\acproxy.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:FIn the command, replace C:\PATH\TO\FILE with the actual path to the file that you are trying to fix.This example grants access to the “acproxy.dll” file:icacls C:\Windows\System32\acproxy.dll /Grant Administrators:F

  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\FILEIn the command, replace C:\PATH\TO\SOURCE\GOOD\FILE with the path of the new file and C:\PATH\TO\DESTINATION\BROKEN\FILE with the path of the corrupted file.
    Quick tip: If you get a message saying you cannot replace the file because another process is using it, then either find and terminate the process or perform this task offline. (See above steps).This example replaces the “acproxy.dll” file in the System32 folder:

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

  6. Type the following command to verify the integrity of the Windows 10 system files and press Enter:sfc /verifyonly

  7. (Optional) Type the following command to verify the integrity of the replacement file and press Enter:sfc /verifyfile=C:\PATH\TO\REPLACED\FILEIn the command, replace C:\PATH\TO\REPLACED\FILE with the path of the file you replaced.This example verifies the integrity of the “acproxy.dll” file inside the System32 folder:sfc /verifyfile=C:\Windows\System32\acproxy.dll

If the new files pass the integrity check after you finish the instructions, you will have fixed the Windows 10 difficulties.

If you are unable to correct the installation using the System File Checker, you may wish to consider reinstalling Windows 10.

The sfc /scannow command is one of many unique switches available in the sfc command, which invokes System File Checker through the Command Prompt application.

 

While there are other things you can perform with the command, sfc /scannow is the most often used.

 

Sfc /scannow will examine all of your computer’s critical Windows files, including Windows DLL files. If System File Checker discovers an issue with one of these protected files, it will replace it.

How to Use SFC /Scannow

  1. Open Command Prompt as an administrator, very often referred to as an “elevated” Command Prompt.

    For the sfc /scannow command to work properly, it must be executed from an elevated Command Prompt window in Windows 11, Windows 10, Windows 8, Windows 7 and Windows Vista.

  2. Type the following command and then press Enter.

    sfc /scannow
    Windows 10 Command Prompt showing "sfc /scannow"

    To use System File Checker from the Command Prompt through Advanced Startup Options or System Recovery Options, see the Executing SFC /SCANNOW From Outside of Windows section below for some necessary changes in how you execute the command.

    System File Checker will now verify the integrity of every protected operating system file on your computer. It might take a while to finish.

    When the verification process completes, you’ll see something like this in the Command Prompt window, assuming problems were found and corrected:

    Windows Resource Protection found corrupt files and successfully repaired them. Details are included in the CBS.Log windir\Logs\CBS\CBS.log. For example C:\Windows\Logs\CBS\CBS.log. Note that logging is currently not supported in offline servicing scenarios.

    …or something like this, if no problems were found:

    Windows Resource Protection did not find any integrity violations.

    In some situations, most often in Windows XP and Windows 2000, you may also need access to your original Windows installation CD or DVD at some point during this process.

  3. Restart your computer if sfc /scannow repaired files. System File Checker may or may not prompt you to restart but even if it doesn’t, you should restart anyway.

  4. Repeat whatever process caused your original problem to see if sfc /scannow resolved it.

How to Interpret the CBS.log File

When you run System File Checker, it creates a LOG file that lists every file that was examined and every repair operation that was performed.

 

Assuming Windows is installed on the C: disk, the log file is located here and may be accessed with Notepad or another text editor:

C:\Windows\Logs\CBS\CBS.log
A screenshot of a CBS log file that results from the System File Checker.

This file could be useful for advanced troubleshooting or as a resource for a tech support person that might be helping you out.

Executing SFC /SCANNOW From Outside of Windows

When using sfc /scannow from outside of Windows, such as from the Command Prompt accessible when booting from your Windows installation disc or flash drive, or from your System Repair Disc or Recovery Drive, you must provide the location of Windows.

Here’s an example:

sfc /scannow /offbootdir=d:\ /offwindir=d:\windows

The /offbootdir= option specifies the drive letter, while the /offwindir= option specifies the Windows path, again including the drive letter.

Depending on how your machine is set, the Command Prompt doesn’t always assign drive letters in the same manner that you see them while you’re within Windows. In other words, Windows may be at C:Windows when you use it, but D:Windows when you use the Command Prompt in ASO or SRO.

In most installations of Windows 11, Windows 10, Windows 8, and Windows 7, C: becomes D:, however in Windows Vista, C: remains C:. To be sure, search for the disk with the Users folder on it—this is the one on which Windows is installed, unless you have numerous installations of Windows on other drives. Use the dir command to search for directories in Command Prompt.

 

If Our Method Resolve Your Problem Consider To Share This Post, You can help more People Facing This Problem and also, if you want, you can Subscribe at Our Youtube Channel as Well!