David Bailey
Banned


- Messages
- 10,485
- Location
- Harrisonburg, Va.
sfc /scannow
PAUSE
Dism /Online /Cleanup-Image /RestoreHealth
PAUSE
sfc /scannow
PAUSE
Dism /Online /Cleanup-Image /RestoreHealth
PAUSE
sfc /scannow
PAUSE
Hi, David. Like I wrote you > This is very handy. Thanks for the additions. :thumb:
Is it possible to omit the pause so as to start one right after the other?
How can you restart the system before it runs the dism commandAdded new Lines to .bat code
Code:sfc /scannow PAUSE Dism /Online /Cleanup-Image /RestoreHealth PAUSE
View attachment 19490
The DISM command actually fixes things SFC can't fix.
See picture:
View attachment 19491
Before running it, SFC found un-fixable problems.
After running it, All problems were fixed.
See picture:
View attachment 19489
If you run sfc /scannow as in the .bat file & see problems not fixed press any key & the DISM command will run & fix the problems.
Or to be more efficient you could add another sfc /scannow & pause:
Code:sfc /scannow PAUSE Dism /Online /Cleanup-Image /RestoreHealth PAUSE sfc /scannow PAUSE
If you wanted to run sfc /scannow again just to be sure things are fixed.![]()
Yes, the same batch files will work in Win10 and Win11. Note that to use the SFC and DISM commands you need to run the batch file as an administrator. To make life simple I have put shortcuts to my batch files on the desktop, and have set their Advanced Properties to 'Run as administrator'.I would like to have such a batch file in Windows 10; do you know if what works in Win8, can't work in Win10 ? If so what code modification is required ?