Advertisement
slyfox1186

Batch Script Repair Windows 10 DISM SFC

Dec 9th, 2019
818
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.72 KB | None | 0 0
  1. @echo off
  2. setlocal
  3. prompt $g
  4. color 0a
  5.  
  6. dism.exe /online /cleanup-image /checkhealth
  7. dism.exe /online /cleanup-image /scanhealth
  8. dism.exe /online /cleanup-image /restorehealth
  9.  
  10. sfc /scannow
  11. sfc /scannow
  12.  
  13. echo DISM and SFC have FINISHED
  14. echo See above for the output results
  15. pause
  16. cls
  17. echo Do you want to restart your PC and Re-Register Windows Apps? Recommended.
  18. echo.
  19. echo [y] yes
  20. echo [n] no
  21. echo.
  22.  
  23. set errorlevel=
  24. choice /c yn /m "Press [y]es or [n]o: "
  25.  
  26. if /i not "%errorlevel%"=="1" goto end
  27. cls && echo.
  28. echo shutting down and re-registering apps
  29. timeout 1 >nul
  30. shutdown /g /t 1
  31. timeout 1 >nul
  32. taskkill /f /im wlrmdr.exe
  33. goto exit
  34.  
  35. :end
  36. cls && echo.
  37. echo exiting script
  38. timeout 2 >nul
  39. endlocal
  40. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement