Use DISM to repair an offline image


New Member
Windows 10 is behaving strangely, and I want to use DISM to fix any corruption as a last ditch attempt to fix it before I do a clean reinstall.

I've ran sfc dozens of times, and it reports that it was able to find and fix corruption every time. But clearly something is wrong because I run it, it finds and fixes corruption, I run it a second time, and it finds and fixes corruption a second time. So it's clearly not fixing the corruption. Lately it's started stating saying that a reboot is required before I can run the command, despite rebooting several times. Very odd.

I want to try running DISM from my bootable windows 10 pendrive, using a brand new Windows 10 iso stored on my external harddrive (found at A:/ISOs/win10.iso) as the source image. If that doesn't fix the corruption, nothing will.

I want to:

1) Boot my windows 10 pen drive and open the command line
2) Use DISM to revert pending actions on my offline bootdrive C: (so I can run sfc. I think the command will look something like DISM /image:C:\ /cleanup-image /revertpendingactions /ScratchDir:C but I need help with this. Is cleanup-image part of the path? What is cleanup-image ScratchDir? Hard to see what's a path and what's an argument!)
3) Use DISM to fix my offline bootdrive (C: installation USING the iso stored on A:, found at A:/ISOs/win10.iso

However the DISM command is very tricky to use which is why I need your help. It's hard to see what's a path and what's an argument in the documentation.

So could I have 2 very clear example DISM commands that I would run to achieve steps (2) and (3) please. Remember they are being run on an unbooted, offline image.


Fantastic Member
Premium Supporter
Hi wubuu,
Welcome to the forum!

I'm not the DISM expert here, but we could use some basic information about your hardware environment prior to giving commands that can destroy your data on that hard drive. Please post back Make/Model of your computer? Is it a desktop PC or laptop? Is it an OEM computer (Dell, HP, Acer, Gateway, etc.), or is it a self-built PC?

Also, it would be very helpful to get the exact model of the hard drive you are attempting to run these DISM commands on, for example, WD1040EX-AO1LS. If you are unable to get this information because you are unwilling or unable to remove your hard drive from your desktop PC or laptop, download the free SPECCY diagnostic at and post the text output back to this thread for us to analyze further.

Also, you say your Win10 is behaving strangely. Can you please quantify that statement. That's like telling your mechanic that your car is driving funny, but you don't know anything more.:confused: Does your Win10 lag on bootup? Does it Blue-Screen? Does it hang or freeze? Which programs is it not running? (For example, does 1 browser such as Internet Explorer work on a website but another browser doesn't such as Chrome or Firefox). Do all programs (browser, E-mail client, MS Office apps, Adobe, etc.) fail to work correctly?o_O In other words we need some specific examples of what is failing, or 1 or more error messages that pop-up when you attempt to run a particular program (yes, you'll need to write those error messages down or capture them with a screenshot and post back here).

Just so we understand what your goal is here, you are trying to repair a secondary hard drive. But, you are not telling us how this drive is hooked up to your computer; for example, via Motherboard SATA port, USB port, or via a SATA-USB bridge. How is your drive attached to your computer then?o_O

And you should be aware that DISM does not always repair a hard drive regardless of whether it's a boot drive (C:) or a secondary drive. In that case, is your goal going to be data recovery from that damaged drive? Since DISM isn't guaranteed to work on all repairs (specifically in the case that your hard drive is faulty), I would also ask if you've run manufacturer hard drive diagnostics on that drive? If not, you should download the free SEATOOLS drive diagnostic and run both the short and long tests. If SEATOOLS returns any errors on either test, your hard drive is faulty and must be replaced! And, if it is indeed faulty, you should consult back with us here for data recovery options.

Once we have this information, we can help you further. :)

Best of luck,


Windows Forum Team
Staff member
You don't need to run DISM on a offline disk. DISM /Online /Cleanup-Image /RestoreHealth will repair a live system.