Users often ask in which order the two commands to fix system file corruptions – sfc /scannow and Dism /Online /Cleanup-Image /RestoreHealth – should be run. To know the answer to this question you first need to understand what functions these two commands perform.
- Please read: How To Repair Corrupt System Files
SFC (System File Checker)
System File Checker is a native Windows tool that scans for and replaces any corrupt or missing system files with a copy stored locally in the WinSxS folder. Because this function is performed entirely locally there is no requirement for the PC to be connected to the Internet.
DISM (Deployment Image Servicing & Management)
The command Dism /Online /Cleanup-Image /RestoreHealth, replaces any corrupt or missing system files in the WinSxS folder with those from an online image. This function operates between locally stored files and files stored in the cloud so requires an Internet connection.
In summary, SFC /scannow is the command which actually identifies and replaces corrupt or missing system files. Dism /Online /Cleanup-Image /RestoreHealth is the command which ensures the copies that SFC uses to replace corrupt or missing system files are themselves not corrupt or missing.
File corruptions are not uncommon and can be caused by a number of culprits, the most prevalent of which would be malware infections. Bad user habits and some optimization/tweaking/customization software can also cause system file corruption. Symptoms of system file corruption can vary greatly but will more often than not result in some sort of unusual behavior.
SFC Or DISM: What Order?
The correct order in which to run the two commands is debatable. One school of thought is to run the DISM command first to ensure that all copies of system files stored in the WinSxS folder are 100% clean and accounted for, which then pretty much assures that running the SFC command after will result in successful repairs. An alternative school of thought is to run SFC first and if all system files are successfully repaired then there is no need to run the DISM command at all. I tend to agree with the latter school of thought.
So, if you run the sfc /scannow command and the message displayed at the completion of the scan tells you that system file corruptions have been identified but not all could be repaired, you now know this means it’s highly likely that the copies stored in the WinSxS folder are also corrupt or maybe missing and it’s time to run the Dism /Online /Cleanup-Image /RestoreHealth command.
- For more details please Read: SFC Fails To Fix Errors – What Now?