1. #1
    zigzag3143's Avatar
    Join Date
    Mar 2012
    Posts
    3,741
    • specs System Specs
      • Manufacturer:
        HP
      • Model Number:
        DV7
      • Cooling:
        Coolermaster U3 best in class
      • Operating System:
        Win 8 RTM

    Windows 8 How to use SFC /SCANNOW command in Windows 8

    You have encountered a situation where your system files might get corrupted. In such cases the easiest way to rebuild the damage files or to find who which ones got corrupted you could use “SFC SCANNOW” command on Windows 8. To run SFC Scannow follow these steps.
    From Our own Capt Jack Sparrow''

    http://captaindbg.com/how-to-use-sfc...in+Debugger%29
    writhziden, Capt.Jack Sparrow and jcgriff2 say thanks for this.

    MS-MVP Windows IT-PRO 2010-2017
    MCC-2013-2017
    Wankiya & Dyami
    Team ZigZag






    • Ad Bot

      advertising
      Beep.

        
       

  2. #2
    AceInfinity's Avatar
    Join Date
    Feb 2012
    Location
    Canada
    Posts
    1,716

    Re: Windows 8 How to use SFC /SCANNOW command in Windows 8Windows 8

    Instead of specifying C:\ directly, I think it would be better especially if you had that command in a batch file to be using:
    Code:
    findstr /C:”[SR] Cannot repair member file” %windir%\logs\cbs\cbs.log > %windir:~0,1%:\sfcreport.txt
    Instead of:
    Code:
    findstr /C:”[SR] Cannot repair member file” %windir%\logs\cbs\cbs.log > C:\sfcreport.txt
    But other than that, if you're typing it out, you may not want to remember (if you don't know batch), or write all of that out. It would be my preference, although if you know C:\ is there and you can write to that drive letter location, it should be fine. The odd setup though depending, you may have things different.

    I've got to get stuff up on my new website and blogs.... lol

    edit: You can also use:
    Code:
    %SystemDrive%\sfcreport.txt
    Last edited by AceInfinity; 11-25-2012 at 12:22 AM.
    Capt.Jack Sparrow and jcgriff2 say thanks for this.
    \n\n

    Automation Programmer
    Development Site: aceinfinity.net

  3. #3
    writhziden's Avatar
    Join Date
    May 2012
    Location
    Colorado
    Posts
    2,328
    • specs System Specs
      • Manufacturer:
        Sony
      • Model Number:
        VPCF232FX/B
      • Motherboard:
        Sony Corporation VAIO
      • CPU:
      • Memory:
        8.00 GB Crucial CT2KIT51264BF1339 DDR3 1333
      • Graphics:
      • Sound Card:
        Realtek High Definition Audio/nVidia High Definition Audio
      • Hard Drives:
        TOSHIBA MK5061GSY 500 GB (465 GB actual)
      • Case:
        Laptop black matte case with backlit keyboard
      • Cooling:
        Air cooling via fan and heat exchanger heatsink
      • Display:
        Laptop display
      • Operating System:
        Windows 7 Home Premium 64 Bit

    Re: Windows 8 How to use SFC /SCANNOW command in Windows 8Windows 8

    I personally prefer to read through the CBS log file and find the [SR] lines myself by eye or with the find command. There is a lot more useful information there without parsing it out automatically via a script or a string finding method.

    niemiro is the best I've seen at getting information from the CBS log file after a system file check, and he was the one who taught me how useful it is to get all the information provided through that log instead of parsing out the [SR] lines.

  4. #4
    AceInfinity's Avatar
    Join Date
    Feb 2012
    Location
    Canada
    Posts
    1,716

    Re: Windows 8 How to use SFC /SCANNOW command in Windows 8Windows 8

    Quote Originally Posted by writhziden View Post
    I personally prefer to read through the CBS log file and find the [SR] lines myself by eye or with the find command. There is a lot more useful information there without parsing it out automatically via a script or a string finding method.

    niemiro is the best I've seen at getting information from the CBS log file after a system file check, and he was the one who taught me how useful it is to get all the information provided through that log instead of parsing out the [SR] lines.
    You don't need to parse out the [SR] lines only though, and that's the beauty of having a script to do it for you. If you know lines that may be valuable, it's still fairly easy to retrieve all of the unaccounted lines by modifying what to look for automatically. :)

    Provide me with a variety of lines, and i'll come up with a script that can retrieve them all so I can show you what I mean if you want? Remember, findstr supports Regex.

    ~Ace
    \n\n

    Automation Programmer
    Development Site: aceinfinity.net

  5. #5
    niemiro's Avatar
    Join Date
    Mar 2012
    Location
    District 12
    Posts
    7,815

    Re: Windows 8 How to use SFC /SCANNOW command in Windows 8Windows 8

    I probably should publish a tutorial on this. I have a draft, it just needs proof reading and tweaking. Just need to find the time!

    There is a balance between including too much, and making the log unreadable for the normal person, and not including enough.

    Personally, I like taking the entire log so that I know that I have everything, rather than being slightly in doubt as to whether I have everything. In addition, I screen all CBS.logs I get (even just SFC ones) for non-SFC Windows Update problems.

    I revise this every so often, but here is my current favourite SFC only log:

    Code:
    findstr /C:"[SR]" /c:"Hashes for file member" /c:"Manifest hash for component" /c:"Unable to load manifest for component" /c:"Expected:" /c:"Found:" /c:"Store corruption detected in function" /c:"FileHashMismatch on resource"/c:"WARNING: Deleting invalid luacdf" /c:"Repair results created:" /c:"Looking for manifest in Backup Dir..." %windir%\logs\cbs\cbs.log > %userprofile%\Desktop\sfcreport.txt
    and with "Error " as well (notice the space at the end, this was intentional). This shows non-SFC related errors also. I personally prefer it, as I might just pick something else up. However, care needs to be taken, as not all errors need to be fixed. It just requires looking over and assessing. It also has the advantage of picking up all errors during the SFC run. These are rare, but do happen. Sometimes they prematurely end SFC, othertimes a certain file cannot be scanned. Don't miss the fact that it might be corrupt. It couldn't be scanned, it didn't come back clean. I have included the most common error in the first report ("Unable to load manifest for component"), but there are others. If you detect one, with the exception of "Unable to load manifest for component", a whole CBS.log may need to be taken.

    Code:
    findstr /C:"[SR]" /c:"Hashes for file member" /c:"Manifest hash for component" /c:"Unable to load manifest for component" /c:"Expected:" /c:"Found:" /c:"Store corruption detected in function" /c:"FileHashMismatch on resource"/c:"WARNING: Deleting invalid luacdf" /c:"Repair results created:" /c:"Looking for manifest in Backup Dir..." /c:"Error " %windir%\logs\cbs\cbs.log > %userprofile%\Desktop\sfcreport.txt
    Oh, and I dislike the Microsoft KB article on SFC logs. It is extremely incomplete, and in fact is so incomplete that it is next to useless in analysing a log with an actual error in it

    My CBS tutorial also explains how I analyse a log sometimes with >100,000 lines in <1 minute. More details to be released soon.

    Richard
    Capt.Jack Sparrow says thanks for this.

  6. #6
    AceInfinity's Avatar
    Join Date
    Feb 2012
    Location
    Canada
    Posts
    1,716

    Re: Windows 8 How to use SFC /SCANNOW command in Windows 8

    Don't forget that findstr has Regex capabilities :)

    The only downside is that it has a compact version of the full Regex functionality... "Pseudo-Regex"

    edit: This could be a great app for practice development... :)
    Last edited by AceInfinity; 11-25-2012 at 06:04 AM.
    \n\n

    Automation Programmer
    Development Site: aceinfinity.net

  7. #7

    Re: Windows 8 How to use SFC /SCANNOW command in Windows 8

    Thanks Ace! Updated :)
    AceInfinity says thanks for this.
    Shyam Sasindran
    Blog: Captaindbg

Similar Threads

  1. SFC /scannow reports some files cannot repair.
    By Tim Fitzgerald in forum BSOD, Crashes, Kernel Debugging
    Replies: 2
    Last Post: 05-21-2013, 07:26 PM
  2. SFC /scannow reports 2 files which it can not repair.
    By d.stinson in forum Windows Update
    Replies: 0
    Last Post: 05-20-2013, 05:26 PM
  3. sfc /scannow reports 6 files it cannot repair
    By tosime in forum Windows Update
    Replies: 33
    Last Post: 05-20-2013, 11:44 AM
  4. Replies: 2
    Last Post: 05-05-2013, 03:13 AM
  5. [SOLVED] SFC scannow cannot repair some files
    By jean in forum Windows Update
    Replies: 30
    Last Post: 12-12-2012, 04:06 AM

Log in

Log in