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!
- 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.
- DISM /Online /Cleanup-Image /RestoreHealth
is not available for win 7. ( DISM commands are very limited on win 7)
- & You can always make System Image ( Macrium Reflect ) before that!
/RestoreHealthcommands checks the backups of all system files contains within%WinDir%\WinSxSagainst known good copies from Windows Update servers.SFC /ScanNowchecks all system files within%WinDir%(excl.WinSxS) against the known good backup copies contained withWinSxS. There are times when/RestoreHealthmay fail due to a dirty component store - runDISM /Online /Cleanup-Image /StartComponentCleanupprior to/RestoreHealth; however/RestoreHealthshould always be ran prior to runningSFC. – JW0914 Sep 21 '19 at 13:20