How to check if your Windows files are damaged and restore them with the Sfc Scannow command.
One of the most useful commands in a Windows environment during a problem is sfc scannow.
In reality, the real command is sfc, whereas the scannow is an optional switch that allows you to ask Windows to detect and replace any damaged files on your system.
Sfc scannow is useful when system errors are found, and Windows is no longer working properly.
Born with previous versions of Windows, the SFC utility is always present – further improved – even in Windows 7, Windows 8.1, and Windows 10.
Run Sfc Scannow from Windows
The SFC utility can be launched from the Windows command prompt when the operating system is running.
This approach allows you to solve less complex situations, especially if the system file corruption does not seriously impact the operating system’s functioning.
To proceed, just type cmd in the Windows search box, then press the CTRL + SHIFT + ENTER key to open the command prompt with administrator rights.
At this point – before starting SFC – we recommend you to disable the real-time protection of the antivirus software installed as it could negatively affect the operation of the utility.
By typing sfc / scanow, Window will check each system file’s integrity and restore the damaged items.
At the end of the system scan, SFC will indicate that:
– no file integrity problems are detected
– discrepancy is detected that is automatically corrected
– problem is found but can not be solved (some or all of them ). The information on the operations performed by SFC is noted in the % windir% \ Logs \ CBS \ CBS.log file.
To extract only the list of interventions made on the system by SFC from this file, type the following instruction at the command prompt:
findstr / c: “[SR]”% windir% \ Logs \ CBS \ CBS.log >% userprofile% \ sfclog.txt && notepad% userprofile% \ sfclog.txt
In the text file that will open on the screen, you will find all the information you are looking for, and in particular, the list of damaged files that are just restored.
If SFC confirmed the troubleshooting, just reboot the system and verify that they have been resolved.
If the problems are indicated as unsolved (at least part of them), you can try to use the following command:
dism / Online / Cleanup-Image / restorehealth
After rebooting the system, the advice is to use the sfc / scannow command again.
If the problems are not resolved, you will necessarily have to perform a Windows recovery or a reinstallation of the operating system (see, for example, How to restore Windows 10 without losing data).
Sfc Scannow can also be run from the emergency menu.
On Windows 10 systems, the emergency menu appears automatically after the operating system is not starting after two consecutive attempts, or you can make it appear by holding down the SHIFT key. At the same time, click on Restart from Windows.
On the screen that will appear, select Troubleshoot, Advanced Options, then Command Prompt.
In this case, the syntax of the SFC utility changes – we will see this later.
Start Sfc Scannow from the Windows installation media
Alternatively, you can create Windows installation media (see Download Windows 7, Windows 8.1, and Windows 10 from Microsoft servers ) by taking the operating system ISO file and preparing a bootable USB stick.
The ISO image of the installation media can be inserted into a bootable USB media by using the free utility Rufus: Bootable USB stick – how to prepare it (more information also in the article Rufus, a guide to using the program for creating bootable media ).
In the case of Windows 8.1 and Windows 10, you can use the Media Creation Tool software to prepare the bootable USB key.
After starting the system with the USB key containing the Windows installation files, the screen for choosing the language and keyboard layout appears. Now press the key combination SHIFT + F10 to bring up the command prompt.
Sfc Scannow syntax when starting the utility from the emergency menu or the Windows installation media
In this case, type the following command:
sfc / scannow / offbootdir = Y: \ / offwindir = Y: \ windows
Instead of the letter Y: the drive letter corresponding to the drive, or in any case, to the partition hosting the \ Windows folder.
The drive containing the Windows installation to be repaired not necessarily C:
Therefore, we suggest typing commands dir c:, dir d:, and so on to make sure what is the correct drive.
As soon as SFC has completed the scan, you can type the command exit and reboot the system.
A tech-savvy writer with a knack for finding the latest technology in the market, this is what describes John Carter. With more than 8 years of experience as a journalist, John graduated as an engineer and ventured soon into the world of online journalism. His interest includes gadget reviews, decoding OS errors, hunting information on the latest technology, and so on.