SFC /SCANNOW Command - Run in Windows 8

How to Run "SFC /SCANNOW" Command at Boot or in Windows 8 and 8.1


information   Information
The SFC command scans the integrity of all protected system files and replaces incorrect versions with correct Microsoft versions.

This tutorial will show you how to run the sfc /scannow command at boot or in Windows 8 to attempt to repair corrupted or modified system files.

Tip   Tip
If you get the Windows Resource Protection Could Not Start the Repair Service error when trying to run SFC, then make sure that the Windows Modules Installer service is enabled, click/tap on Start, and set to Manual.

Services - Start, Stop, and Disable in Windows 8

OR

Copy and paste the command below in the elevated command prompt, and press Enter. After the Windows Modules Installer service has started, try running the SFC command again

net start trustedinstaller


If SFC is unable to repair corrupted system files because the store (source) is corrupted, then you could run the Dism /Online /Cleanup-Image /RestoreHealth command to fix Windows component store corruption, then afterwards try running the SFC scan again.

warning   Warning
The KB3022345, KB3035583, and KB3068708 updates will cause SFC to give you a false mismatch message in SFC for files related to these updates.

You can safely ignore these results in your SFC details since it will not affect SFC from being able to repair other system files.


CONTENTS:







OPTION ONE

To Run SFC /SCANNOW Command at Boot



1. Open a command prompt at boot.

2. In the command prompt, type diskpart and press Enter, then type list volume and press Enter. (see screenshot below)

SFC-boot-1.jpg

3. Make note of the drive letters for your boot drive (ex: 350MB "System Reserved" partition) and Windows 8 drive, then type Exit and press Enter. (see screenshot above)
NOTE: If you do not have a "System Reserved" partition, and are not multi-booting with another operating system, then the boot drive and Windows 8 drive may be the same drive letter.

4. In the command prompt, type the command below and press Enter. (see screenshot below)
NOTE: You will see a blinking cursor at the prompt until finished. This will take a while to finish running though.


sfc /scannow /offbootdir=C:\ /offwindir=D:\windows


Note   Note
You will need to substitute the drive letter of the partition/volume where your system boot files are stored in the offbootdir=C: part of the command above instead.[

You will need to substitute the drive letter of your Windows 8 partition/volume in the offwindir=D: part of the command above instead.




SFC-boot-2.jpg

5. When the scan is complete, hopefully you will see an all is ok message like below.

finished.jpg


6. Close the command prompt, and restart the computer to start Windows 8.

Note   Note
If SFC could not fix something, then run the command again to see if it may be able to the next time. Sometimes it may take running the sfc /scannow command 3 times restarting the PC after each time to completely fix everything that it's able to.

If not, then run the Dism /Online /Cleanup-Image /RestoreHealth command to repair any component store corruption, restart the PC afterwards, and try the sfc /scannow command again.

If still not, then you could do a refresh of Windows 8, or run a System Restore using a restore point dated before the bad system file occured to fix it. You may need to repeat doing a System Restore until you find a older restore point that may work.

When running SFC offline (at boot), SFC logging in the CBS.log file is not supported to be able to create a sfcdetails.txt file in OPTION THREE below.











OPTION TWO

To Run SFC /SCANNOW Command in Windows 8



1. Open an elevated command prompt or elevated PowerShell.

2. In the elevated command prompt or PowerShell, type sfc /scannow and press Enter. (see screenshot below)
NOTE: This may take a while to finish running.

SFC-1.jpg

3. When the scan is complete, hopefully you will see an all is ok message like the bottom screenshot below.
NOTE: Luckily SFC was able to repair my corrupted system files automatically.

SFC-2.jpg

CMD_No_Errors.jpg

Note   Note
If SFC could not fix something, then run the command again to see if it may be able to the next time. Sometimes it may take running the sfc /scannow command 3 times restarting the PC after each time to completely fix everything that it's able to.

If not, then run the Dism /Online /Cleanup-Image /RestoreHealth command to repair any component store corruption, restart the PC afterwards, and try the sfc /scannow command again.

If still not, then try using OPTION ONE above to run the sfc /scannow command at boot

If still not, then you could do a refresh of Windows 8, or run a System Restore using a restore point dated before the bad file occured to fix it. You may need to repeat doing a System Restore until you find a older restore point that may work.

If still not, then you can use the steps in the TIP box in the OPTION THREE section below to manually replace the files that SFC could not fix.


If you would like to get help with your SFC issue, then be sure to upload and attach your sfcdetails.txt file from OPTION THREE below in your post.














OPTION THREE

How to View Only the "SFC" Scan Results from the CBS.LOG



Note   Note
When SFC runs, it logs it's actions into the C:\Windows\Logs\CBS\CBS.log. The steps in this option will show you how to see only the specific SFC entries with the [SR] tags in this CBS.log. This can be helpful to show you what files SFC could not fix automatically if you wanted to try and manually replace them.

When running SFC offline (at boot) in OPTION ONE, SFC logging in the CBS.log file is not supported to be able to create a sfcdetails.txt file.




1. Open an elevated command prompt or elevated PowerShell.


2. In the elevated command prompt or PowerShell, copy and paste the command below and press Enter.
NOTE: This will place a sfcdetails.txt file on your desktop with only the SFC scan result details from the CBS.LOG in it.

Code:
findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"




3. 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.




Tip   Tip
If you need to replace a corrupted system file that SFC cannot fix, then this will show you how to:

If you have to many files that are corrupted, then run the Dism /Online /Cleanup-Image /RestoreHealth command to repair any component store corruption, restart the PC afterwards, and try the sfc /scannow command again.

If you only have a few, then you could manually extract a new copy directly from your Windows 8 installation DVD or USB thumb drive, or ISO file if in a virtual machine.

Extract Files from Windows 7 Installation DVD








That's it,
Shawn


 

Attachments

  • File_System.png
    File_System.png
    13.3 KB · Views: 629
Last edited by a moderator:
When i play cities skylines i get a crash to desktop and an error that says: application has been blocked from accessing graphics hardware. First it was saying "display driver stopped responding and has recovered" i solved this error by increasing the TDR time, which gave me the other error.
 
It doesn't seem related to the files SFC found to be corrupted (mismatched). I'd recommend to create a new thread for that issue to hopefully get a solution for it.
 
Thanks for the help. I will postpone this issue to tenforum if it still persistent whenI'm using win 10.
 
Is this a good thing to run after cleaning out some Ad ware using Malware removal tools like Malware Bytes, Spy Search & Destroy etc.
 
A question about the SFC /scannow and other DISM commands ..

Can these commands be run while using the PC, e.g. web browsing, etc?
Or is it better to close all programs, and not to use the PC while the commands are running?
 
Hello Atomcrusher,

Yes, you can safely use the computer as usual while the command are running. :)
 
How to list "Cannot Repair" files only.

In regard to SFC, I know how to output the CBS.log to a text file, but I'd really like to do is output a list of the "cannot Repair" files ONLY. That is, only list the DLL files, etc. that cannot be repaired by SFC.
Is this possible please? If so, how please?
Thanks a lot. :)
 
Hello thewizardox, and welcome to Ten Forums. :)

You can substitute [SR] in the command in OPTION THREE to anything you want to search for in the CBS.log to output to the .txt file.

The command below using cannot repair will give you only a list of files SFC cannot repair, but no other details.

Code:
findstr /c:"Cannot repair" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"
 
I installed Windows 8.1 Update Enterprise on a disk with the GPT partition scheme.

I'm performing the procedure of the option one and I noticed that, writing "list volume" of the diskpart command, the "System Reserved" partition has no assigned letter. Why? How do I identify this partition in order to run the next command?

Thanks

Bye
 
Last edited:
I'm performing the procedure of the option one and I noticed that, writing "list volume" of the diskpart command, the "System Reserved" partition has no assigned letter. Why? How do I identify this partition in order to run the next command?

Thanks

Hello Balubeto, :)

It's not suppose to have a drive letter to prevent folks from messing with it since it's a system partition require by Windows.
 
I'm performing the procedure of the option one and I noticed that, writing "list volume" of the diskpart command, the "System Reserved" partition has no assigned letter. Why? How do I identify this partition in order to run the next command?

Thanks

Hello Balubeto, :)

It's not suppose to have a drive letter to prevent folks from messing with it since it's a system partition require by Windows.
So, how should I assign a letter to this partition with diskpart command to perform your procedure?

When I will end perform this procedure, how I will do to remove this letter?

When I display a list of the disk partitions, three partitions are displayed: two NTFS and one FAT32 partitions. The FAT32 partition is the "System Reserved". Right?

Thanks

Bye
 
It should be, but you should also have a label to help ID it.
 
I used 'sfc /scannow' from the bootable usb recovery and it found and repaired corrupt files the 3 times I ran it. Is this command suppose to find and repair corrupt files each time it's ran? I should of scan the drive for errors first before I made an image with macrium reflect, thats why the automatic repair boot loop that couldn't be repaired on my new SSD?
 
Hello computernoop407, :)

Check to see if running SFC while in Windows 8 finds any errors. If it does, then please post back with a sfcdetails.txt file to see what it's reporting.
 
Thank you for replying, here is the attach log after the scan was finish. It says 'windows resource protection found corrupt files but was unable to fix some of them.' When I preview my post, the attached .txt log shows, but when I post it, it doesn't show? Not sure why? The 'enhanced attachment uploading is off'.

View attachment sfcdetails.txt
 
Last edited by a moderator:
Back
Top