When things go wrong in Windows, something that is not very complicated, the operating system has several tools to solve its problems. And it is that if some of its features do not work correctly, or your PC hangs and a blue screen appears, it is possible that it could be due to some system files are corruptedor somehow don’t work as they should.
Fortunately, Windows has a very useful command that can get us out of trouble: ‘sfc/scannow’. In this article we tell you what it is for and how to execute it correctly.
What is the ‘sfc /scannow’ command used for?
As Microsoft says, this command is part of the Windows System File Check Tool, and when you run it, the system will do a scan of the system files and it will check if each and every one of the elements that makes the Microsoft software work and if they work correctly.
The command was introduced in Windows 7, and is about a great utility that everyone should know for when a problem arises on our computer and we don’t know what exactly it might be.
How to run the command and repair the corrupted files
To execute the command, all we have to do is open the Command Prompt (CMD) tool with administrator privileges and type the following line:
When we do, we press ENTER and the system will take care of verifying and correcting the files. The process can take several minutes, although we have an indicator as a percentage to know how much is left for you to complete the task. At the end, we should receive one of these messages:
- Windows Resource Protection found no integrity violations: This means that there are no system files that are damaged or missing.
- Windows Resource Protection could not perform the requested operation: According to Microsoft, this problem is resolved by running the tester again in safe mode and making sure that both the PendingDeletes and PendingRenames folders are inside the %WinDir%\WinSxS\Temp directory.
- Windows Resource Protection found damaged files and successfully repaired them. Details are included in CBS.Log %WinDir%\Logs\CBS\CBS.log: As you mention, in this case the system found corrupted files and repaired them correctly. If you want to see the details of the process, you can go to the directory mentioned in the message, or run the following command and open the file that will be generated on the desktop:
findstr /c:”[SR]” %windir%\Logs\CBS\CBS.log >”%userprofile%\Desktop\sfcdetails.txt”
- Windows Resource Protection found damaged files but was unable to fix some of them. Details are included in CBS.Log %WinDir%\Logs\CBS\CBS.log: For some reason, the system could not fix some files. To do this, we must know which files could not be repaired through the text file that is generated after the check and replace them manually. To do this, we will have to add administrator privileges to the corrupt file (we can do it with ‘takeown /f C:\windows\system32\filename’ or ‘icacls C:\windows\system32\filename /grant administrators:F’) and replace it with the good file that we have copied from another installation of Windows.