5

I have two computers (win10x64 and win7x86) that completely freeze from time to time (black screen), and the only solution is to unplug them.

If I use DISM /Online /Cleanup-Image /RestoreHealth, how will it affect the currently installed software, or any windows configuration I might have changed. Will I need to start over ?

  • Any corrupt system files will be repaired. – Ramhound Jun 11 '18 at 13:54
  • The /RestoreHealth commands checks the backups of all system files contains within %WinDir%\WinSxS against known good copies from Windows Update servers. SFC /ScanNow checks all system files within %WinDir% (excl. WinSxS) against the known good backup copies contained with WinSxS. There are times when /RestoreHealth may fail due to a dirty component store - run DISM /Online /Cleanup-Image /StartComponentCleanup prior to /RestoreHealth; however /RestoreHealth should always be ran prior to running SFC. – JW0914 Sep 21 '19 at 13:20
0

Run first sfc /scannow before doing DISM.

Theoretically, your configuration should not be affected by either of these commands. But in case of advanced degradation of your system, the repair itself might cause further damage. The chances for that are very slim, but do not skimp on backups before starting.

I suggest having a look at this answer of mine.

| improve this answer | |
  • 2
    You should never run SFC /ScanNow before running DISM /Online /Cleanup-Image /RestoreHealth due to the fundamental purposes of both commands. /RestoreHealth checks the backups of all system files contains within %WinDir%\WinSxS against known good copies from Windows Update servers. SFC /ScanNow checks all system files within %WinDir% (excl. WinSxS) against the known good backup copies contained with WinSxS. There are times when /RestoreHealth may fail due to a dirty component store - run DISM /Online /Cleanup-Image /StartComponentCleanup prior to /RestoreHealth – JW0914 Sep 21 '19 at 13:17
  • @JW0914: Although Microsoft also recommends running DISM first, I'm not sure that I wouldn't first attempt to use the drivers on the computer before letting Microsoft modify them from its servers. My link also recommends running DISM only if SFC is unable to complete. – harrymc Sep 21 '19 at 15:33
  • DISM does nothing with drivers - its purpose is to ensure WinSxS houses known good copies of all system files contained within C:\Windows, which is what SFC uses for comparison & replacement. There's multiple reasons DISM should be ran prior to SFC, such as not doing so risks creating a larger problem that may not be immediately apparent if the component store is dirty (i.e if it houses backups of the same file(s) for multiple Windows versions, which can occur with more regularity due to the bi-annual updates of Windows 10 - this will generally cause DISM to fail, but it's not guaranteed) – JW0914 Sep 22 '19 at 10:58
  • I haven't been able to find a single link on Microsoft Docs that provides an in-depth explanation of WinSxS, but this article on The Windows Club does a decent job, whereas this Microsoft Docs article gives a basic explanation. – JW0914 Sep 22 '19 at 11:18
  • 1
    I'm not understanding that logic, as WinSxS isn't there to improve Windows, it's there (in this context) to maintain a backup of every Windows system file within the %WinDir%. For example, by running SFC first, the user has no idea if the backup files in WinSxS, which is what SFC relies upon for hash comparison to check for corruption, are not corrupted (DISM is what ensures this). DISM isn't going to upgrade Windows, it's just going to ensure the WinSxS backup matches the hash they should for the version of Windows installed (checked against Windows Update servers or a Windows image). – JW0914 Sep 22 '19 at 11:45
0

Dism /Online /Cleanup-Image /RestoreHealth

and /or

sfc /scannow

Both will restore modified & corrupted system files. So, you can lose your overzealous windows customizations. Ideally, it should not change non-Microsoft programs & settings, still depending on the level of corruption!

  1. If you are so concerned about your customizations, You can just run scans

sfc /verifyonly

and /or

Dism /Online /Cleanup-Image /ScanHealth

They will just check the files without any repair process ( as here & here ). Analyze the log/ report & decide.

  1. DISM /Online /Cleanup-Image /RestoreHealth

is not available for win 7. ( DISM commands are very limited on win 7)

  1. & You can always make System Image ( Macrium Reflect ) before that!
| improve this answer | |
  • TO ADD : One should run sfc /scannow multiple times & if the problem is not solved, he should consider running DISM Restore Health command. Then again run sfc /scannow to make sure that everything has got well. – Vineet Garg Jan 27 at 6:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.