Use the SFC scannow command to fix Windows 10 file system errors

Use the SFC scannow command to fix Windows 10 file system errors

If you notice that your computer frequently crashes or has trouble booting … then the most likely cause is because Windows system files are corrupt, lost or even changed when You install a certain program or software on your computer.

While Windows 10 protects the system files needed for your computer to function properly, application files, drivers, and even Windows Update are pretty good. However, in some cases the error still occurs.

Like previous versions of Windows, Windows 10 also has a handy built-in System File Checker (SFC). This utility will scan, verify, and repair any corrupted files on your system.

1. How to use SFC / scannow on Windows 10

1. Press the Windows + X key combination to open the Power User Menu and then select Command Prompt (Admin). The reason is because you must run the SFC command as an administrator.

2. On the Command Prompt window, enter the following command and press Enter:

sfc /scannow

3. After the scan is completed, on the screen you will see one of the following messages:

Windows Resource Protection did not find any integrity violations : There is not any file lost or corrupted on your system.

• Windows Resource Protection could not perform the requested operation : If this message appears, there is 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 : You will get this message if SFC is able to fix the problem you are having. You can now scroll or view details.

• Windows Resource Protection found corrupt files but was unable to fix some of them: In this case you have to fix the corrupted files manually.

2. Run SFC / Scannow on other drives

SFC / Scannow can also be used to check and repair non-system files in other drives, such as D: or external hard drive, USB, SD card or other storage media. In order to run a scan on such drives, you need to modify the command slightly as shown below. The rest of the process is the same as above.

sfc/scannow/offbootdir=Drive Name: /offwindir=Drive name:windows
Run SFC / Scannow on other drives

3. View the details of the SFC scan

To view the details of a System File Checker stored on the CBS.Log file, you must make a readable copy on the Desktop:

1. Press the Windows + X key combination to open the Power User Menu and then select Command Prompt.

2. On the Command Prompt window, enter the following command and press Enter:

findstr /c:"[SR]" %windir%LogsCBSCBS.log >"%userprofile%Desktopsfclogs.txt"

3. Open sfclogs.txt on the Desktop with Notepad. This file will contain all the details of the scanned system files and information about the files that cannot be fixed.

Note : SFC scan details are only available when you scan in Windows, not when you scan offline in the Command prompt.

If you must know what the SFC file cannot repair, use the Find function in a text application with the phrase “cannot repair”. You can also use “repair” and “repaired” to see any files that have been repaired.

Use “repair” and “repaired” to see any files that have been repaired

Use “corrupt” to detect corruption in different applications. If the file cannot be repaired easily, then you need to replace and remove it. This is shown in the final status message: “Windows Resource Protection found corrupt files but was unable to fix some of them” .

Use “corrupt” to detect corruption in different applications

4. Run an SFC scan in Safe Mode

If you see a second status message during system scan: “Windows Resource Protection could not perform the reques’ted operation” then the SFC scan should be done in Safe Mode. To access it, select “Change advanced startup options” from the Start menu.

Select “Change advanced startup options” from the Start menu

Select “Restart now” to start Windows 10 in Safe Mode.

A blue screen will appear. Using the keyboard’s arrow keys, select Troubleshoot> Advanced options , which will lead to the next screen below.

Choose “Command Prompt” from the available options.

Sign in with your Windows user ID and password. It is better to use the Enter key to quickly navigate these screens.

Now, the Command Prompt screen appears on a blue background in Safe Mode. You can scan your system much faster here, and status verification and alerts don’t take long.

The Command Prompt screen appears on a blue background in Safe Mode

5. Scan and fix Windows 10 Offline system files

1. Press the Windows + I key combination to open the Settings application.

2. On the Settings interface, click Update & security.

3. Next, click on Recovery.

4. Under Advanced startup, click Restart now.

5. Click Troubleshoot.

6. Click Advanced options.

7. Click Command Prompt to boot your computer using just Command Prompt.

8. During reboot you will be prompted to enter the username and password to continue.

9. Whenever you need to run SFC outside of Windows, you must tell the utility exactly where the Windows installation files are.

On the Command Prompt window, enter the following command line so that the utility understands the Windows and System Reserved partition location:

wmic logicaldisk get deviceid, volumename, description

10. Enter the following command in the Command Prompt window and press Enter:

sfc /scannow /offbootdir=C: /offwindir=D:Windows

Note:

In the treen command, use / offboodir to convert the specific drive letter of the System Reserved partition, in this case C and / offwindir to change the specific location of the Windows files, in this case D: Windows .

11. After the scan is finished, close the Command Prompt window.

12. Click Continue to exit and return to Windows 10.

6. Manually repair system files on Windows 10

If the System File Checker is unable to fix one or several errors, you will have to manually fix these files.

Open the sfclogs.txt file to see which files are corrupt, find the file locations and follow the steps below:

1. Press the Windows + X key combination to open the Power User Menu, then select Command Prompt (Admin).

2. On the Command Prompt window, enter the following command and press Enter:

takeown /f C:Path-and-File-Name

Note:

Replace C: Path-and-File-Name with the path and filename of the error. For example, C: Windows System32 appraiser.dll.

3. Allow access to corrupted files under Admin by entering the following command into the Command Prompt and then pressing Enter:

icacls C:Path-and-File-Name /Grant Administrators:F

4. Replace the files in the questionnaire by copying the following command and pressing Enter:

copy C:Path-SOURCE-and-File-Name C:Path-DESTINATION-and-File-Name

Note:

In the above command replace C: Path-SOURCE-and-File-Name with a good path and filename, and replace C: Path-DESTINATION-and-File-Name with the destination path and file names. error.

Such as:

copy D:Filesappraiser.dll C:WindowsSystem32appraiser.dll

5. Type Yes and then press Enter to confirm the override.

After replacing the files, you can enter the command SFC / verifyonly in the Command Prompt window and press Enter to check the integrity of all files and check which files are corrupted to fix.

Also, if you want to fix only a few files, you can check the integrity of each file using the command:

sfc /VERIFYFILE=C:Path-and-File-Name

For example:

sfc /VERIFYFILE=C:WindowsSystem32kernel32.dll

Refer to some more articles below:

  • Your Windows 10 computer has a slow Internet connection, here’s how to fix it
  • Enable Credential Guard to increase Windows 10 security
  • Clear Windows 10 update Cache to free up memory space

Good luck!

1