Fix Missing or Corrupt Files When the Computer Won't Boot
In the Command Prompt window, use the sfc command with two additional parameters:/offbootdir and /offwindir.
The parameter /offbootdir is used to specify the boot partition - the partition that contains the boot files needed for booting Windows 7. The /offwindir parameter is designed to specify the location of the Windows 7 directory.
For example, I wanted to scan the drive that contains my operating system. On my computer it was D:. On most computers, it generally is C:. The directory where Windows 7 is installed on my computer is D:\Windows. On most computers, it generally is C:\Windows.
Therefore I need to type sfc /scannow /offbootdir=d:\ /offwindir=d:\windows and press Enter. The translation for this command is: scan the windows folder located on boot partition, in this case the D: partition, and fix missing or corrupt files.
If any corrupt or missing files are found, they are repaired automatically.
Fix Missing or Corrupt Files When Your Computer Boots
When your computer boots, simply open the Command Prompt as administrator and type sfc /scannow. The /scannow parameter allows you to scan the integrity of all protected system files and repairs the problematic files when possible. In the picture below you can see how this command works.
If any corrupt files are found, they are repaired automatically and a log file is created, generally found at this location: C:\Windows\Logs\CBS\CBS.log. The result of the command is displayed below.