What exactly does sfc /scannow do?

Discussion in 'Windows 7' started by ThomasMann, Mar 7, 2019.

  1. ThomasMann

    ThomasMann MDL Expert

    Dec 31, 2015
    1,216
    193
    60
    With all the tweaking that is needed with Win7, is there anything sfc /scannow could change, that I do not want changed?

    I got a bit suspicious, when I ran it, because the log file is about a mile long....

    Thanks for your answers...
     
  2. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    21,907
    30,237
    390
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. ThomasMann

    ThomasMann MDL Expert

    Dec 31, 2015
    1,216
    193
    60
  4. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    21,907
    30,237
    390
    Use the info i gave you and you will exactly know what sfc /scannow did.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,136
    24,058
    340
    Only if errors are found, the system will try to restore the original files and logs what files it found. No errors = no changes done.

    To parse the log for errors i use a similiar command like the one given by @Enthousiast.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. ThomasMann

    ThomasMann MDL Expert

    Dec 31, 2015
    1,216
    193
    60
    Thank you, but....

    I have seen the logfile (attached) and it contains over 1000 lines like these:
    0: Move File: Source = [l:192{96}]"\SystemRoot\WinSxS\Temp\PendingRenames\f96bf00d0ed5d401620a0000340de00e._0000000000000000.cdf-ms", Destination = [l:104{52}]"\SystemRoot\WinSxS\FileMaps\_0000000000000000.cdf-ms"
    1: Move File: Source = [l:162{81}]"\SystemRoot\WinSxS\Temp\PendingRenames\f96bf00d0ed5d401630a0000340de00e.$$.cdf-ms", Destination = [l:74{37}]"\SystemRoot\WinSxS\FileMaps\$$.cdf-ms"
    2: Move File: Source = [l:216{108}]"\SystemRoot\WinSxS\Temp\PendingRenames\f96bf00d0ed5d401640a0000340de00e.$$_resources_fbee56ab048ab239.cdf-ms", Destination = [l:128{64}]"\SystemRoot\WinSxS\FileMaps\$$_resources_fbee56ab048ab239.cdf-ms"
    3: Move File: Source = [l:260{130}]"\SystemRoot\WinSxS\Temp\PendingRenames\f96bf00d0ed5d401650a0000340de00e.$$_resources_ease_of_access_themes_e29108c7f81ea04c.cdf-ms", Destination = [l:172{86}]"\SystemRoot\WinSxS\FileMaps\$$_resources_ease_of_access_themes_e29108c7f81ea04c.cdf-ms"
    4: Move File: Source = [l:214{107}]"\SystemRoot\WinSxS\Temp\PendingRenames\7af1f90d0ed5d401660a0000340de00e.$$_system32_21f9a9c4a2f8b514.cdf-ms", Destination = [l:126{63}]"\SystemRoot\WinSxS\FileMaps\$$_system32_21f9a9c4a2f8b514.cdf-ms"
    5: Move File: Source = [l:242{121}]"\SystemRoot\WinSxS\Temp\PendingRenames\da52fc0d0ed5d401670a0000340de00e.$$_system32_wdi_perftrack_e5904ddd3f58b556.cdf-ms", Destination = [l:154{77}]"\SystemRoot\WinSxS\FileMaps\$$_system32_wdi_perftrack_e5904ddd3f58b556.cdf-ms"
    6: Move File: Source = [l:256{128}]"\SystemRoot\WinSxS\Temp\PendingRenames\da52fc0d0ed5d401680a0000340de00e.$$_system32_wdi_perftrack_traces_0af2b48360b94cec.cdf-ms", Destination = [l:168{84}]"\SystemRoot\WinSxS\FileMaps\$$_system32_wdi_perftrack_traces_0af2b48360b94cec.cdf-ms"
    7: Move File: Source = [l:216{108}]"\SystemRoot\WinSxS\Temp\PendingRenames\bc39080e0ed5d401690a0000340de00e.$$_servicing_fc2045b9046cc796.cdf-ms", Destination = [l:128{64}]"\SystemRoot\WinSxS\FileMaps\$$_servicing_fc2045b9046cc796.cdf-ms"
    8: Move File:
    2019-03-08 02:49:04, Info CSI Source = [l:234{117}]"\SystemRoot\WinSxS\Temp\PendingRenames\bc39080e0ed5d4016a0a0000340de00e.$$_servicing_editions_596ea20ddafb9f7d.cdf-ms", Destination = [l:146{73}]"\SystemRoot\WinSxS\FileMaps\$$_servicing_editions_596ea20ddafb9f7d.cdf-ms"

    and none of these tells me what I want to know, which is.... Can sfc change anything that I do not want to be changed?
     

    Attached Files:

  7. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,136
    24,058
    340
    Even if one would be able ... would you believe the person?

    I mean these are pending rename operations in the components temp folder ...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. ThomasMann

    ThomasMann MDL Expert

    Dec 31, 2015
    1,216
    193
    60
    Yes, I understand that. That is why I did not ask that.
    I still think, the question I asked is pretty clear: Can sfc change anything that I do not want to be changed? Yes or No?
     
  9. boyonthebus

    boyonthebus MDL Senior Member

    Sep 16, 2018
    365
    186
    10
    If you have patched files, say to enable 3rd party themes, it will replace them with original files. So, if you have a heavily modified Windows, it is probably best not to run sfc.
     
  10. ThomasMann

    ThomasMann MDL Expert

    Dec 31, 2015
    1,216
    193
    60
    Thank you....
     
  11. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,136
    24,058
    340
    As if my first reply didn' say exactly this ... :D.

    BTW: Proper theme related 'hacks' use DLL hooking (In-RAM-Patching) which will survive every scan ;).
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. ThomasMann

    ThomasMann MDL Expert

    Dec 31, 2015
    1,216
    193
    60
    Well, there are few things,f.e. using the installation disc for system repair and so I was wondering what they actually do. When I look back, I clean install my OS every two or three years. And my old computer (i5, 4th gen) returns with start up times of 7 seconds. But this enormous list from sfc made me question its usefulness... it is usually short.
    You wrote: "if errors are found, the system will try to restore the original files". Do you think that answered my question, if sfc will attempt replace any telemetry or anything of the kind. So to speak, my question was what does MS man by "error"
     
  13. solarstone2149

    solarstone2149 MDL Member

    Dec 11, 2009
    150
    35
    10
    error = edited file
    could be by malware, some crazy anti-virus or you if you edit look of your OS
    system then compares "currently" used system files with "original" inside WinSxS folder
    then if mismatch is found, files from WinSxS are copied over "edited ones"

    in short, it is crappy way for system restore
    and yes, if you have installed an update that contains telemetry,
    it will restore telemetry back :p
     
  14. ThomasMann

    ThomasMann MDL Expert

    Dec 31, 2015
    1,216
    193
    60

    That is simply not true.....
     
  15. josephdfox5

    josephdfox5 MDL Novice

    Mar 11, 2019
    4
    1
    0
    The sfc /scannow command will scan all protected system files, and replace corrupted files with a cached copy that is located in a compressed folder at %WinDir%\System32\dllcache. The %WinDir% placeholder represents the Windows operating system folder. For example, C:\Windows.
     
  16. akhmedtaia

    akhmedtaia MDL Addicted

    Nov 2, 2013
    500
    124
    30
    how to fix , this program might require administrator privileges _ in windows 7
     
  17. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,136
    24,058
    340
    Run the CMD via right-click as admin.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    21,907
    30,237
    390
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...