sfc-and-dism.bat
· 727 B · Batchfile
Исходник
:: The following commands will repair/replace corrupted/missing system files, as well as clear up disk space. They must all be ran in an elevated Command Prompt
sfc /scannow
:: If no issues are reported, or they are reported all fixed, you are done. or, optionally skip to Step 6. Otherwise, continue.
DISM /Online /Cleanup-Image /CheckHealth
DISM /Online /Cleanup-Image /ScanHealth
DISM /Online /Cleanup-Image /RestoreHealth
:: Note: the following optional steps will free up disk space, but also remove files allowing uninstallation of Windows Updates.
DISM /Online /Cleanup-Image /AnalyzeComponentStore
DISM /Online /Cleanup-Image /StartComponentCleanup
DISM /Online /Cleanup-Image /StartComponentCleanup /ResetBase
| 1 | :: The following commands will repair/replace corrupted/missing system files, as well as clear up disk space. They must all be ran in an elevated Command Prompt |
| 2 | |
| 3 | sfc /scannow |
| 4 | |
| 5 | :: If no issues are reported, or they are reported all fixed, you are done. or, optionally skip to Step 6. Otherwise, continue. |
| 6 | |
| 7 | DISM /Online /Cleanup-Image /CheckHealth |
| 8 | |
| 9 | DISM /Online /Cleanup-Image /ScanHealth |
| 10 | |
| 11 | DISM /Online /Cleanup-Image /RestoreHealth |
| 12 | |
| 13 | :: Note: the following optional steps will free up disk space, but also remove files allowing uninstallation of Windows Updates. |
| 14 | |
| 15 | DISM /Online /Cleanup-Image /AnalyzeComponentStore |
| 16 | |
| 17 | DISM /Online /Cleanup-Image /StartComponentCleanup |
| 18 | |
| 19 | DISM /Online /Cleanup-Image /StartComponentCleanup /ResetBase |