How can I check and fix Windows System files when I have various problems with Windows?

Print article Email to friend
0.00

There are 2 ways of checking the files.

  1. The SFC command checks the files in your windows installation with good files found on your system. For any Windows System File it finds that is either corrupt, missing, bad or infected with a virus. When this process is finished it will display that there are 'no errors' or that it 'found errors but could not fix them all'. If errors were found but not all problems were fixed then proceed to the DISM command.
  2. The DISM command does the same as the SFC command but checks the files online with Microsoft Files in stead of with files on your computer.

To use these commands open an Command Windows run as administrator and then use one or both the following commands as needed.

To use the SFC command type the following into an elevated command prompt and press enter.
sfc /scannow
Wait for the counter to reach 100% complete and read any notifications shown. If there were errors proceed to the DISM command.

Sometimes you may need to run the sfc command three times to fix everything.
To see only the sfc scan results as a text document open an elevated command type window and type:
findstr /c:"[SR]" %windir%LogsCBSCBS.log> %userprofile%Desktopsfcdetails.txt

3. Now close the elevated command prompt. 
4. Open the sfcdetails.txt file on your desktop to see the SFC scan details in the CBS.LOG. 
5. When finished, you can safely delete the sfcdetails.txt file afterwards if you like.

To use the DISM command type the following into an elevated command prompt and press enter.
dism /online /cleanup-image /restorehealth

The DISM /Cleanup-Image tool saves it's log files in the file locations below. To be able to view these logs, you would need to copy them from the locations below to your desktop, then open them from your desktop.

C:WindowsLogsCBSCBS.log
C:WindowsLogsDISMdism.log

You could also use the following command switched if you like:

Dism /Online /Cleanup-Image /CheckHealth
/CheckHealth - This switch option only checks to see if a component corruption marker is already present in the registry. It is just a quick way to see if corruption currently exists, and to inform you if there is corruption. It does not fix anything or create a log. This should be finished almost instantaneous.

Dism /Online /Cleanup-Image /ScanHealth
/ScanHealth - This switch option does not fix any corruption. It only checks for component store corruption and records that corruption to the log file. This is useful for only logging what, if any, corruption exists. This should take around 5-10 minutes to finish.

Dism /Online /Cleanup-Image /RestoreHealth
/RestoreHealth - (recommended) This switch option checks for component store corruption, records the corruption to the log file, and FIXES the image corruption using Windows Update. This should take around 10-15 minutes up to about an hour to finish depending on the level of corruption.

When finished, it is recommended to restart the PC to configure any updates that may have been affected by this.

NOTE: Some scans may take a while to finish and may seem like it's hung at times, but let it sit running until finished.

How can I check and fix Windows System files when I have various problems with Windows?

There are 2 ways of checking the files.

  1. The SFC command checks the files in your windows installation with good files found on your system. For any Windows System File it finds that is either corrupt, missing, bad or infected with a virus. When this process is finished it will display that there are 'no errors' or that it 'found errors but could not fix them all'. If errors were found but not all problems were fixed then proceed to the DISM command.
  2. The DISM command does the same as the SFC command but checks the files online with Microsoft Files in stead of with files on your computer.

To use these commands open an Command Windows run as administrator and then use one or both the following commands as needed.

To use the SFC command type the following into an elevated command prompt and press enter.
sfc /scannow
Wait for the counter to reach 100% complete and read any notifications shown. If there were errors proceed to the DISM command.

Sometimes you may need to run the sfc command three times to fix everything.
To see only the sfc scan results as a text document open an elevated command type window and type:
findstr /c:"[SR]" %windir%LogsCBSCBS.log> %userprofile%Desktopsfcdetails.txt

3. Now close the elevated command prompt. 
4. Open the sfcdetails.txt file on your desktop to see the SFC scan details in the CBS.LOG. 
5. When finished, you can safely delete the sfcdetails.txt file afterwards if you like.

To use the DISM command type the following into an elevated command prompt and press enter.
dism /online /cleanup-image /restorehealth

The DISM /Cleanup-Image tool saves it's log files in the file locations below. To be able to view these logs, you would need to copy them from the locations below to your desktop, then open them from your desktop.

C:WindowsLogsCBSCBS.log
C:WindowsLogsDISMdism.log

You could also use the following command switched if you like:

Dism /Online /Cleanup-Image /CheckHealth
/CheckHealth - This switch option only checks to see if a component corruption marker is already present in the registry. It is just a quick way to see if corruption currently exists, and to inform you if there is corruption. It does not fix anything or create a log. This should be finished almost instantaneous.

Dism /Online /Cleanup-Image /ScanHealth
/ScanHealth - This switch option does not fix any corruption. It only checks for component store corruption and records that corruption to the log file. This is useful for only logging what, if any, corruption exists. This should take around 5-10 minutes to finish.

Dism /Online /Cleanup-Image /RestoreHealth
/RestoreHealth - (recommended) This switch option checks for component store corruption, records the corruption to the log file, and FIXES the image corruption using Windows Update. This should take around 10-15 minutes up to about an hour to finish depending on the level of corruption.

When finished, it is recommended to restart the PC to configure any updates that may have been affected by this.

NOTE: Some scans may take a while to finish and may seem like it's hung at times, but let it sit running until finished.