Sfc scannow found corrupted files. Windows Resource Protection has detected corrupted files but is unable to repair some of them

Checker system files (System File Checker), built into Windows, can check system files for damage and any other changes. If the file has been modified, the utility will automatically replace it with the correct version.

When to use these commands

These commands will be useful when diagnosing a faulty operating system Windows. If the system issues blue screen, applications crash or some do not work system functions, the SFC team can help. Even if executing the SFC command does not fix anything, this will allow you to verify that the system files are not damaged and you can continue diagnostics in other ways.

The DISM command is not required under normal circumstances. But if the SFC command fails or cannot replace damaged files Normal, DISM, or System Update Readiness Tool can fix the operating system itself and allow the SFC command to run normally.

Fixing system files with the SFC command

The SFC command must be run as an administrator. To do this, on Windows 10 or 8.1, click right click Click on the Start icon and select the Command Prompt (Admin) option. Moreover, in all Windows versions you can search in the Start menu/on home screen according to the words “command line”, click on the required link right-click and select “Run as Administrator”.

For full check system, enter the following command in the command prompt window and press :

Do not close the window until the command completes. The process can be quite lengthy. If everything is in order, after the check the message “Protection Windows resources“Windows Resource Protection did not find any integrity violations.”

If you see the message “Windows Resource Protection found corrupt files but was unable to fix some of them,” first try booting your system into Safe Mode. In Windows 10, 8.1 or 8, to do this, hold down the key when selecting the “Restart” option in the shutdown menu to get to the selection screen additional parameters downloads. On Windows 7 and above earlier versions Restart your computer and hold down the key during startup. After booting into safe mode, run again sfc team/scannow.

Fixing SFC problems with the DISM command

In Windows 10, 8.1, and 8, you can use the Deployment Image & Servicing Management (DSIM) tool to fix component store corruption that is preventing SFC from working properly.

To run this tool, open a Command Prompt window as an administrator, type the following command, and click . DISM will check the storage Windows components for damage and will automatically fix any detected problems.

DISM /Online /Cleanup-Image /RestoreHealth

Do not close the Command Prompt window until the process is complete. The verification may take up to 10 minutes. If the progress bar stays at 20% for a long time, don’t worry, this is normal.

If according to the results of execution DISM commands any changes are made, restart your computer. Once done, run the SFC command again and it will be able to replace the damaged files with the correct ones.

In Windows 7 and earlier versions, the DISM command is not available. Instead, you can download from the official website Microsoft Tool checking the system's readiness for an update, which allows you to check the system for problems and try to fix them.

System Restore or Return to initial state

If problems persist and these tools cannot fix them, you can take more radical measures. System Restore allows you to return Windows to its original state. early state, which will solve the problem if the operating system was still working in that state.

You can also reset Windows to its factory state or reinstall it. In Windows 10, 8.1 and 8, you can use the Computer Restore () feature, which allows you to return Windows to its original state. After this you will have to reinstall all programs, but user files will not be harmed. In Windows 7 and earlier, you should use a recovery partition created by your computer manufacturer, or simply reinstall Windows from scratch.

If you encounter other errors when running the commands described above, try searching for their description on the Internet. Often the command output contains information about log files, where you can find more detailed information about certain problems. And in the end, it is not at all necessary to waste time on diagnostics complex problems when you can just restore factory condition or reinstall Windows.

The commands described above have other options. For example, you can use SFC to check and fix individual system files. And using DISM you can do quick check system without a patch, or point the utility to a WIM or ESD file containing Windows system files.

Materials

This article shows the steps by which you can recover damaged Windows system files using the SFC utility

If the operating system is unstable and various errors are noticed in its operation, then to troubleshoot problems you can use the SFC command line utility to restore the integrity of damaged system files.

SFC (System File Checker) - system Windows tool to check and restore system integrity, which scans and checks all protected Windows system files for errors and replaces damaged or missing files with a copy Windows files, located in the WinSxS directory.


How to check and repair damaged system files using the SFC utility

To scan and repair damaged system files, run the following command as an administrator:

Depending on the scan results, you will see one of the following messages:

Windows Resource Protection did not detect any integrity violations. This means that no damaged or missing files were found on the system.

Windows Resource Protection cannot perform the requested operation. This message means that an error occurred during scanning. If you encounter this issue, try running the command sfc /scannow

Windows Resource Protection detected corrupted files and successfully repaired them. See CBS.Log WinDir%\Logs\CBS\CBS.log for information. This message appears when the SFC utility was able to correct the problem. You can view detailed information about the files that were recovered in the log file stored in C:\Windows\Logs\CBS\CBS.log

Windows Resource Protection has detected corrupted files, but is unable to repair some of them. See CBS.Log %WinDir%\Logs\CBS\CBS.log for information. In this Windows case Failed to fix some files. Again, you can see the list of files in the log file stored in C:\Windows\Logs\CBS\CBS.log. In this case, the user will have to manually replace the missing or corrupted files.

You can also check and restore damaged system files using open as administrator.

How to check and repair damaged system files if the system does not boot

If the operating system does not boot, then you can also use the tool to restore the integrity of damaged system files, since the SFC utility supports offline scanning and recovery of damaged system files.

To do this you will need a (disk) with . Boot from installation media and on the screen for selecting regional settings, launch the command line, to do this, press the combination Shift keys+ F10

Now you need to find out the letter of the partition on which the operating system is installed Windows system which needs to be checked. This must be done because the drive partition letters in boot environment often different from those used in the running system.

There are several ways to do this, such as diskpart, wmic or the dir command, but we will use another method.

At the command prompt, run the following command:

In the Notepad window that opens, select from its main menu File - Open...

In the Explorer window, you will see the available sections and the letters assigned to them. IN in this example The partition on which the operating system is installed has the letter C. The Explorer and Notepad windows can now be closed.

Knowing the letter of the partition on which the operating system is installed, run the following command at the command line:

sfc /scannow /OFFBOOTDIR=C :\ /OFFWINDIR=C :\Windows

If errors or failures of any files are detected in the operating system, experienced users use special program OS sfc /scannow helps solve many of them. It checks data integrity and displays the status of system files in a line. If it found errors and could not automatically repair them, the user sees the following message - “Windows Resource Protection found corrupted files, but could not repair some of them.” What to do next? You will find the answer in this article.

Troubleshooting - Windows has detected corrupt files

The most common cause of damaged files is instant shutdown computer from the network, especially when several applications are running at once. The system does not have time to save and organize all the data, which is why the desktop icons may move during the next startup. Some applications also refuse to launch, the screen resolution is reset to minimum and other problems. Less commonly, the problem is caused by viruses and utilities for cleaning and optimizing your computer.

After scanning files on the command line with the sfc /scannow utility, the message that it could not fix it looks like this: the scan is 100% complete. OS resource protection found damaged files, but could not restore them. You can read about the results in the CBS.Log file, which lies along a specific path.

Along this path there is a text file in which logs of the program’s actions are written and to the average user little will be clear about them. Even if you are trying to deal with this problem yourself, you still need the help of an experienced system administrator. You can find it on thematic forums. But it will be faster to finish reading the article and fix this error.

The next tip would be to run the DISM utility in the same command line (you need to run it as an administrator). She turns to Microsoft server and asks missing files your operating system there. After downloading them, the utility restores them. After this command completes the process, you will need to run the sfc /scannow file scan again. This is necessary to make sure that the message - Windows File Protection has found damaged files, but is unable to restore them - no longer appears.


It is not necessary to enter the command in uppercase, the computer will understand you perfectly, even if you write in small letters. If you entered a character incorrectly or missed a character or a space, then error 87 will appear, which indicates that the typing syntax is incorrect. If the DISM utility recovers your files, you will see the following message: Restore failed. No recovery source was found or the files cannot be recovered.


Recovering damaged files using PowerShell

There is another way to restore your computer to its previous working state. It is based on the use of a special shell, PowerShell, which is positioned as an improved environment for entering commands, as opposed to the command line. To use it, you must also find PowerShell in the Start menu and right-click on it. Here enter the following command: Repair-WindowsImage –Online –RestoreHealth and press the ENTER key.


Unlike the previous command, this one does not call for the necessary files to the Microsoft server. It takes data from a specially backed up version of your operating system and uses it for recovery. And this method is distinguished by a more detailed recovery operation.

You need to wait for the data recovery process to complete. No programs should be running during this time. Everything unnecessary, including additional devices computer, you need to turn it off. When the process completes successfully, you will see a window with scan statuses.

From the above example it is clear that hard drive/dev/sdb is connected but not mounted. Let's mount it hard section drive /dev/sdb1 to drive /dev/sda. Let's choose a mount point, for example - /home/user/Video. You can take any mount point.

# sudo mount /dev/sdb1 /home/ user/Video

where user is the name of your username.

Everything is very simple, first you write the mount command, then you write what needs to be attached (the number shows the partition number, we only have one), and then where to attach it. This is almost always enough. The disk is mounted using the mount command in the specified folder. In some cases, when there are logical errors on the partitions of the connected hard drive, you must additionally specify the file system type. IN in this case we have ext3.

# sudo mount -t ext3 /dev/sdb1 /home/ user/Video

This parameter can also take the following values:

  • -t ntfs or -t ntfs-3g
  • -t vfat
  • -t iso9660

Respectively for NTFS, FAT and CD drives file systems. The latter is only needed to connect CD/DVD-ROM devices and the .iso disk image.

To manually set access parameters to a mounted partition, specify the following parameter:

  • -o rw
  • -o ro
The first allows reading and writing, the second only reads. Well, for example, like this:

# sudo mount -t ext3 -o rw /dev/sdb1 /home/user/Video

Additional options that help in some cases:

# sudo mount -t ext3 -o rw,iocharset=utf8,codepage=866 /dev/sdb1 /home/user/Video

The first one explicitly specifies the system locale encoding, in our case it is utf8 (for different distributions it is its own, but more often utf8), and the other adds support for the Russian language.

If, however, the hard drive refuses to be mounted in the operating room Linux system, then you can mount it manually. Parameter -o force allows you to force mount hard drive partitions in Linux. Well, for example, like this:

# sudo mount -t ext3 -o force /dev/sdb1 /home/user/Video

For example, my hard drive partition did not want to be mounted after connecting to a Windows machine that was infected with viruses. It so happened that the virus threw autorun.exe at the root of my partition and because of this Linux did not want to mount this partition. The above mount command parameter helped mount the infected partition. After which the virus was successfully removed manually.

Doesn't work correctly, you can use the SFC command line utility to recover damaged or lost system files.

When you start noticing random errors, system boot problems, or Windows component performance issues, there's a good chance that this state caused by damaged or lost system files.

Even though Windows 10 does a great job of protecting the files you need to normal operation computer, some applications, drivers or even Windows updates may cause loss of system stability. Like previous versions of Microsoft systems, Windows 10 includes a system file checker (SFC) - a compact but powerful utility command line that can perform a system integrity scan and replace damaged or missing files with the original version.

IN this manual we will present the steps to use System File Checker (SFC) to automatic recovery damaged system files while the operating system is running. We’ll also look at how to run the utility in Safe Mode command line and how to manually repair damaged system files that are causing problems.

Warning: before starting to work with the SFC utility, it is recommended to make a complete backup copy system or create a system restore point. In case something goes wrong, you can return the system to its original state.

The following command allows you to execute full scan protected files on your computer and fix files that are causing problems while running Windows 10.

Command line

Sfc /scannow

3. Once the scan is complete, you will see one of the following messages:

  • Windows Resource Protection detected no integrity violations. This means that there are no damaged or lost files found on the system.
  • Windows Resource Protection cannot perform the requested operation. This message means that an error occurred during scanning and you need to scan offline.
  • Windows Resource Protection detected corrupted files and successfully repaired them. See CBS.Log WinDir%\Logs\CBS\CBS.log for information. This message appears when SFC was able to correct the problem. You can view the magazine for detailed information.
  • Windows Resource Protection has detected corrupted files, but is unable to repair some of them. See CBS.Log %WinDir%\Logs\CBS\CBS.log for information. In this case, you need to manually fix the damaged files.
Advice: To correct all problems, you may need to go through the integrity check procedure about three times.

To view information about the operation of the integrity checker in the CBS.Log file, you need to create a readable copy of the file on your desktop:

1. Search for Start menu Command line, right-click on the link that appears and select Run as administrator.

2. Type the following command and press Enter

Findstr /c:"" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfclogs.txt"

3. Open the sfclogs.txt file located on your desktop using Notepad. The file will contain detailed information about system scans and files that could not be recovered.

Note: detailed information is only available when performing a scan in Windows 10, but not when running the utility in Safe Mode in Command line.

Sometimes protected system files that need to be restored are already downloaded to RAM during Windows works 10. In this case, you can use the System File Checker during system startup to correct the detected problems.

  • 1. Use a keyboard Windows combination+ I to open the Settings app.
  • 2. Select the “Update and Security” section.
  • 3. From the menu, select the “Recovery” option.
  • 4. In the section “ Special options download” click the “Restart now” button.

  • 5. Select “Troubleshooting”.
  • 6. Go to “Advanced Settings”.
  • 7. Click “Command Prompt” to boot your computer into command line mode.


  • 8. After rebooting, you will need to enter your username and password.
  • 9. You need to indicate the SFC where the installation files Windows. At the Command Prompt, enter the following command to recognize the location of Windows 10 files and system reserved partitions:

  • 10. Type the following command and press Enter:
sfc /scannow /offbootdir=C:\ /offwindir=D:\Windows

Note that in the example to specify the drive letter reserved by the system partition, the /offboodir switch is used. In this case, this is drive C, and the /offwindir switch specifies the path to the Windows files, which in our case is D:\Windows.

You need to remember that when you boot your computer in command line mode, the drive letters may be different, so you need to use the command specified in step 9. However, in most cases when working with Windows 10, drive D is used for installation, and drive C is reserved system partition(System Reserved partition).

  • 11. After scanning is completed, close the command prompt.
  • 12. Click “Continue” to exit and boot into Windows 10 as usual.

How to manually restore system files in Windows 10

If System File Checker fails to fix one or more files, you will have to repair them manually.

Open the sfclogs.txt file to determine which files were corrupted. Execute normal search to find file locations or use search engine to receive additional information. Then follow the instructions below to replace the damaged files.

Advice: You may be able to find working versions of system files on another computer that has the same version of the operating system as the original computer.

  • 1. Search for Start menu Command line, right-click on the link that appears and select Run as administrator because device administrator rights are required to run SFC.
  • 2. At the Command Prompt, type the following command and press Enter:
takeown /f C:\Path-and-File-Name

Note: Replace C:\Path-and-File-Name with the path of the damaged file. For example:

C:\Windows\System32\appraiser.dll

  • 3. Allow full access(administrator access) to the damaged files using the following command and pressing Enter.
icacls C:\Path-and-File-Name /Grant Administrators:F copy C:\Path-SOURCE-and-File-Name C:\Path-DESTINATION-and-File-Name

Note: Replace C:\Path-SOURCE-and-File-Name with the path and name working version file, and C:\Path-DESTINATION-and-File-Name must be replaced with the path and name of the damaged file. For example:

Copy D:\Files\appraiser.dll C:\Windows\System32\appraiser.dll

  • 5. Type “Yes” and press Enter to confirm the overwrite.

After replacing the file, you can enter the SFC /verifyonly command and press Enter at the Command Prompt to verify the integrity of all system files to ensure that the problem has been resolved. Additionally, if only some files were corrected, you can check the integrity of each separate file using the command sfc /VERIFYFILE=C:\Path-and-File-Name . For example:

Sfc /VERIFYFILE=C:\Windows\System32\kernel32.dll

Keep in mind that System File Checker can be used not only in Windows 10, but also in previous versions operating system. However, depending on the OS version, some features may differ. At the Command Prompt, enter the command sfc /? to view all available options.

Found a typo? Press Ctrl + Enter