System File Checker = SFC is a tool to scan windows core file and repair installation if needed, the most common use of the tool is to execute:
sfc /scannow
This will scan system file and repair with original version if it will find corrupted files !
Here is a list of all SFC scan switches that you can use :
- /SCANNOW Scans integrity of all protected system files and repairs files with problems when possible.
- /VERIFYONLY Scans integrity of all protected system files. No repair operation is performed.
- /SCANFILE Scans integrity of the referenced file, repairs file if problems are identified. Specify full path <file>
- /VERIFYFILE Verifies the integrity of the file with full path <file>. No repair operation is performed.
- /OFFBOOTDIR For offline repair specify the location of the offline boot directory
- /OFFWINDIR For offline repair specify the location of the offline windows directory
for example, to run Windows Protected Files scan :
sfc /scannow /offbootdir=c:\ /offwindir=c:\windows
There is a tool that can run after you run SFC, its analyzing the logs at %windir%\Logs\CBS , the tool is called SFCfix and you can download it from here (with no guaranty): SFCFix
you need to rn the tool after tou run SFC so it will have a log to analyses.
If SFC failes to rescue you can use DSIM tool, You need to start with :
DISM /Online /Cleanup-Image /CheckHealth
This will check the health of your system
Use the DISM command with the /RestoreHealth switch to scan the Windows image for any corruption and to perform a repair automatically. Unlike the /ScanHealth switch, the /RestoreHealth switch can take up to 20 minutes to complete the process.
DISM /Online /Cleanup-Image /RestoreHealth
You can also point DSIM to specific source image for originals file to replace corrupted ones (concidering D is your windows installation disk):
DISM /Online /Cleanup-Image /RestoreHealth /Source:D:\Sources\install.wim
You can also limit the use of windows update service and to stay offline with the switch /LimitAccess :
DISM /Online /Cleanup-Image /RestoreHealth /Source:D:\Sources\install.wim /LimitAccess
You can also use Group policy to specify the location of the sources :
You can use DISM in Windows PowerShell as well. The commands are slightly different.
- CheckHealth: Repair-WindowsImage -CheckHealth
- ScanHealth: Repair-WindowsImage -ScanHealth
- RestoreHealth: Repair-WindowsImage -RestoreHealth
DISM Instructional Video