dslreports logo
site
 
    All Forums Hot Topics Gallery
spc

spacer




how-to block ads


Search Topic:
uniqs
419
share rss forum feed


Tornado15550

join:2012-12-16
Canada

1 edit

1 recommendation

Guide - How to fix corrupted files on Windows

If your PC has corrupt Windows system files, here is how you can fix them without re-installing Windows.

1) Open up an elevated command prompt (cmd with admin rights)
2) Type in "sfc /scannow" without quotes, and hit enter. Windows will check for and attempt to repair any corrupt files.

If SFC /scannow is unable to fix some of the corrupted files (EDIT: This command only seems to work on Windows 8 or later):
1) Open up an elevated command prompt (cmd with admin rights)
2) Type in "dism /online /cleanup-image /restorehealth" without quotes, and hit enter. Windows will now download and replace any corrupt files.

If you re-run SFC /scannow after you perform these steps, you will notice that it won't find any integrity violations, which means that all corrupt Windows files are fixed.

So why use this method instead of simply re-installing (or upgrading) Windows? Well, first off, you keep all of your files, applications, and settings. And secondly, you won't have to re-install all the Windows Updates after re-installing Windows.

I hope this helps!
Have a nice day!



norwegian
Premium
join:2005-02-15
Outback
Reviews:
·WestNet Broadband

Sounds like good advice.

One question from a discussion a while back on file replacement.
Does the dism /online /cleanup-image /restorehealth download the latest version of the corrupt file, in other words does using an online CRL check or something similar to know what is required? Checksum or something else?

There was discussion whereby using the DVD, CD of the O/S as a source would not give the latest version of a file and hence if a security vulnerability or exploit path was available in an old file version, it would create a security hole, as well as possible conflicting issues with not having all the correct file or direct library link or executable and creating possible issues or conflicting paths going forward from the process of using system file checker.

Just curious; since you have been so kind to post this for reference for forum users; if you don't mind this discussion or question in reply to your post?

--
The only thing necessary for the triumph of evil is for good men to do nothing - Edmund Burke



norwegian
Premium
join:2005-02-15
Outback
Reviews:
·WestNet Broadband
reply to Tornado15550


I can not find how this is possible though, it must use local .cab files, nothing in the documentation would suggest it worked.

Also for Win 8 only?
--
The only thing necessary for the triumph of evil is for good men to do nothing - Edmund Burke



stev32k
Premium
join:2000-04-27
Mobile, AL
kudos:1
Reviews:
·Mediacom
·DIRECTV
·AT&T Southeast
reply to Tornado15550

I just tried your solution for corrupt files and windows (win 7) found some it could not restore. The dism/online/cleanup-image/restorehealth returned an error message. It said "the restorehealth option is not recognized in this context" error 87.

Does that mean the command will not work with win 7?



urbanriot
Premium
join:2004-10-18
Canada
kudos:3

It means some of the switches he provided are Windows 8 only. sfc has been around for ages and is not a new command, they've just added new functionality in Windows 8 that did not exist before.


rjbasye

join:2000-05-24
Dry Ridge, KY

Anyway to fix corrupted files in Windows 7 short of a re install? The command in the op's post doesn't work for me either.



Tornado15550

join:2012-12-16
Canada

1 edit
reply to norwegian

Hi, here is a screenshot of the utility being run on Windows 8:



I'm not too sure how it's done, but I think it scans your Windows files and compares them to the latest files found online, and if there is a mismatch, it will download the new file and replace it. And since it is checking online, you will receive the latest version of the file.
Windows Update didn't prompt me to install any new updates after running the dism command.

And I ran the command on Windows 8.1, so I'm not too sure about Windows 7 compatibility.


Tornado15550

join:2012-12-16
Canada
reply to stev32k

Hi, I think this is a functionality that is only available on Windows 8 or later. I tested this on a Windows 8.1 machine, and it was able to successfully repair all corrupt files in a matter of minutes, really.


Mele20
Premium
join:2001-06-05
Hilo, HI
kudos:4
reply to Tornado15550

Click for full size
According to the Technet articles that relate to this issue, Windows 8 will attempt repair ON ITS OWN if ONLINE, using Windows Update, unless configured to use a different network source in Group Policy where the configuration is the same as that for Features on Demand.

This raises some interesting questions. For instance, in my case, if I don't want to place an image to be used somewhere on my little home network and specify that in Group Policy, but expect Windows Updates to be used, that means I should not have WU disabled most of the time. If there was file corruption, I might not be able to enable it or, perhaps, the corruption might have been less extensive if Windows 8 had been able to access Windows Update and repair itself earlier. I suppose I should put WU on Manual.

"Will attempt to repair itself" is a bit perturbing. Is this done without any notification to the user? Microsoft doesn't say that certain commands must be issued to get Windows 8, if online, to attempt to repair itself.

»technet.microsoft.com/en-us/libr···020.aspx

»technet.microsoft.com/en-us/libr···869.aspx
--
When governments fear people, there is liberty. When the people fear the government, there is tyranny. Thomas Jefferson


natedj
Elected
Premium
join:2001-06-06
Columbia, SC
Reviews:
·AT&T U-Verse
·Earthlink Cable ..
reply to Tornado15550

Has anyone notice any significant improvement after running this command? It looks like a great alternative to a reformat but I'm not sure how this would help the registry, which is the main reason why I do a reformat.
--
Good judgement comes with experience...Experience comes after bad judgements



urbanriot
Premium
join:2004-10-18
Canada
kudos:3
Reviews:
·Cogeco Cable

said by natedj:

Has anyone notice any significant improvement after running this command? It looks like a great alternative to a reformat but I'm not sure how this would help the registry, which is the main reason why I do a reformat.

It's a tool to resolve a specific purpose and not provide optimizations or improvements. You specifically use it to resolve corrupted Windows files so if you don't have an issue involving a corrupted Windows file, you don't need to scan for corrupted files.