Run the following at an elevated prompt:
Dism /Online /Cleanup-Image /StartComponentCleanup
Dism /Online /Cleanup-Image /RestoreHealth
SFC /scannow
Alternatively, copy the following into a batch file and execute with elevated privileges:
@echo off
date /t & time /t
echo Dism /Online /Cleanup-Image /StartComponentCleanup
Dism /Online /Cleanup-Image /StartComponentCleanup
echo ...
date /t & time /t
echo Dism /Online /Cleanup-Image /RestoreHealth
Dism /Online /Cleanup-Image /RestoreHealth
echo ...
date /t & time /t
echo SFC /scannow
SFC /scannow
date /t & time /t
pause
Run the following to launch the tool:
msdt.exe /id PowerDiagnostic
- https://www.thewindowsclub.com/windows-10-closes-apps-when-going-to-sleep
- https://support.microsoft.com/en-us/topic/use-the-system-file-checker-tool-to-repair-missing-or-corrupted-system-files-79aa86cb-ca52-166a-92a3-966e85d4094e
- https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/what-is-dism?view=windows-11