This is the guide to run System file check and DISM command to repair corrupted files in your OS:
- Perform System File Check (SFC)
Follow the steps:
a. Press “Windows Key” to open Start menu
b. Type “cmd” without quotes in the search box.
c. On the left pane, right click on the “cmd” option and select “Run as Administrator”.
d. Type ‘sfc /scannow’ without quotes and hit enter.
Afterwards you would get the output something like:
- Windows did not find any integrity violations (a good thing)-No corruptions found
- Windows Resource Protection found corrupt files and repaired them (a good thing)-Corrupt files found but repaired
- Windows Resource Protection found corrupt files but was unable to fix some (or all) of them (not a good thing)-Corrupt files found but not repaired
Run Deployment Image Servicing and management tool
- Open Command Prompt as indicated above.
- In the Administrator: Command Prompt window, type the following commands. Press Enter key after each command:
DISM.exe /Online /Cleanup-image /Scanhealth
DISM.exe /Online /Cleanup-image /Restorehealth
(There is a space between every switch Indicated)
- To close the Administrator: Command prompt window, type Exit, and then press Enter.
If DISM is unable to repair corrupt files
If the message after running /RestoreHealth throws an error saying “The source files couldn’t be found” then it requires an Installation media to corrupt the files.You should do the following steps if you have one*:
- Double click the ISO file to mount it as a virtual drive.Note the letter of the virtual drive.It would have the same label and Image as F: in the following image:
- Now enter the following command,replacing X as the drive letter on which your ISO is mounted:
Dism /Online /Cleanup-Image /RestoreHealth /Source:wim:X:sourcesinstall.wim:1 /limitaccess
It might take hours to finish,depending on the level of corruption.
Residing from Chandigarh India, Sumit is a Windows Insider MVP awarded for the first time in 2018. He is also an Independent advisor for Microsoft customers and helps voluntarily as well on the forums.