Need help: How do I use DISM offline repair Windows 10 system image?
“I have a machine running Win10 that was fine. But it would not boot one day. I tried my normal steps (eg: safe mode, system restore, sfc, bootrec) without success.” And then, I tried DISM in the offline mode and failed again. The command I used was:
DISM.exe /Image:d:\ /Cleanup-image /Restorehealth /Source:d:\w10\install.wim /LimitAccess /scratchdir:d:\scratch
I wonder if the syntax is wrong or how to use DISM offline repair Windows 10."
I'm sorry but honestly, your command line lack of \offline parameter. You can choose to add it and try again. If it still not working, the DISM.exe may not detect the image. To solve it, you need to mount the Windows ISO first and then try again.
If you don't how to make it, you can continue to see below and learn the detailed steps to use DISM offline repair Windows 10.
What is DISM?
DISM, short for Deployment Image Servicing and Management (DISM.exe), is a command-line tool that can be used to service and prepare Windows images (with .wim or .vhd or vhdx format), including those used for Windows PE, Windows Recovery Environment (Windows RE) and Windows Setup.
In general, it will download necessary files from Windows Update to replace the bad file. But if there are problems or you are not connected to the internet, DISM may fail to repair the corrupted image. In this case, you can try DISM offline command-line with source option.
You can use an "install.wim" or "install.esd" file from another computer, bootable install media, or Windows 10 ISO file. Please be sure these files must be of the same version, edition as well as language of the operating system you are using.
How to use DISM offline repair Windows 10
Here you will use DISM with /Online switch and \offline switch to repair or prepare backup image. First, let's get the difference between them and understand how it works.
/Online switch: It's used to target the current running operating system. There are two requirements: first, the computer is booted into the operating system. Second, the backup image is recaptured and the DISM.exe can detect it.
\Image switch: It's used to target offline Windows image, and it's usually a WIM, VHD or VHDX file.
As the switch meaning suggest, it seems that you need to use DISM \offline to repair Windows 10. And some users report that DISM says it can’t find source files while using DISM /Online.
But that's not exactly the case. you still can use DISM /Online to complete the offline image repair if you mount these offline images first.
Then, you may wander how to perform DISM repair Windows 10 offline step by step. Please continue to see below.
Method 1: Perform DISM repair Windows 10 offline using DISM /Online
Part 1: Mount offline image for preparation
Step 1. Download Windows 10 1809 ISO from Microsoft support website.
Step 2. Open the MediaCreationToolxxx.exe file to access its setup window, and click Accept to agree with license terms.
Step 3. In the "What do you want to do?" window, select "Create installation media (USB flash drive, DVD or ISO file) for another PC". Then, click Next.
Step 4. Select language, architecture, and edition, and then click Next.
Step 5. In the "choose which media to use" window, select ISO file and click Next.
Step 6. Then, select a backup destination to store the ISO file and click Save.
Step 7. In the last window, you will be asked to burn the ISO file to a DVD. Click the link below to open the file location with File Explorer, right-click the ISO file and select Mount to recapture the image.
Step 8. Confirm the drive letter for the recaptured image and remember it. It saves the install.wim file you will use to repair offline image to the source folder. If the drive letter is F:, you need to set the source path as F:\source.
Part 2: Perform DISM offline repair in Windows 10 step by step
Step 1. Press WIN + X and select Command Prompt(Admin) in the search result list.
Step 2 (optional). Type the following commands to clean up the component store and analyze its size. Please remember to hit Enter after each command.
DISM /Online /Cleanup-Image /StartComponentCleanup
DISM /Online /Cleanup-Image /AnalyzeComponentStore
Step 3. Type the following command to repair Windows image with the known good files from install.wim file. Hit Enter is required.
DISM /Online /Cleanup-Image /RestoreHealth /source:F:\Sources\Install.wim:1 /LimitAccess
Note: The parameter /LimitAccess is to restrict the use of Windows Update.
Method 2: Perform DISM offline repair in Windows 10 with DISM /Image
Except for DISM /online, you can directly use DISM /offline to perform DISM offline repair in Windows 10. This process requires the offline backup path to the root directory. Below are the steps:
Step 1. Run command prompt with priority.
Step 2. Type the following command and hit Enter to execute DISM offline repair Windows 10 using ISO file.
Dism /Image: C:\offline /Cleanup-Image /RestoreHealth /Source: c:\test\mount\windows
Protect your Windows 10 system instead of repair
Windows image is essential for a computer to boot properly, if there is any error, your computer may fail to boot and you will lose all the data on it. You may not want to see this, then you will try to repair the image using DISM with the above steps.
But what if it does not work or you encounter other serious problems that make your computer fail? You have no choice but have to reinstall Windows 10. But if you have a system image for your computer, you can easily restore it to a good state.
Thus, it's suggested to create a system image backup with the best backup freeware beforehand - AOMEI Backupper Standard. It will include everything on the system partition, including the operating system, system files, drivers, custom settings, personal data, etc. And you can enjoy other excellent features of this software.
- Schedule backup: It allows you to backup on a regular basis with the Daily/Weekly/Monthly feature and keeps the latest backup of your computer.
- Backup Methods: It provides different backup methods, including full backup, incremental backup, differential backup. You can use it to back up a full copy of your data or only the changed part.
- It supports all the Windows systems (Windows 11/10/8/7/XP/Vista) and multiple backup storages, such as internal disk, external hard drive, USB disk, cloud drive, network share/NAS, etc.
In addition, this software has a clean interface and user-friendly design, so users can easily understand and use it smoothly. Then, download this software to create a backup for your system.
Step 1. Launch this software. Then, click Backup and System Backup in order.
Step 2. Select a location for your backup. If you want to backup to USB drive, you need to insert it into your computer.
Step 3. At the lower location of system backup, you can see "Options", "Schedule" and "Scheme" three options. Click them to customize backup settings. Then, confirm everything is ok and click Start Backup.
Option: You can comment on a task, set compression level, enable email notification, etc.
Schedule: It includes daily/weekly/monthly in Standard edition. If you upgrade to the Pro edition, you can choose event triggers/USB plug in.
Scheme: It enables you to backup only changed files with incremental or differential backup. And you can delete old backups with By quantity, By time or By daily/weekly/monthly cleanup methods. Except for Incremental Backup, other features are available in advanced editions only.
After creating a system image, you can use it to restore Windows image to new hard drive when something bad happens, for example, the Windows image is corrupted and DISM unluckily fails to repair Windows 10.
Launch this software again, find the backup task on the Home tab or go to Restore tab, locate the system image and follow the wizard to complete the operation.
◆ If you don't have any previous backup before your computer behaves abnormal, you can use a system image created on another working computer to restore your computer. Please remember to tick Universal Restore(supported by advanced editions).
◆ In case the computer cannot boot due to system errors, you could create bootable media ahead of time. Alternatively, you could also use the Recovery Environment tool to enable a boot option for quick recovery.
◆ If you want to use this software on multiple Windows computers without installing it, you can create portable version (supported by Tech and Tech Plus edition) of it on a removable device.
Reading here, you may already know how to use DISM offline to repair Windows 10 image when your computer does not work properly. But the repair process is not easy to follow, or it is not working. Thus, you'd better create a system image backup beforehand and then you can restore system image from external hard drive to get your computer back in a very short time.
AOMEI Backupper Standard is not only a free backup software but also disk cloning software. Thus, you can use it to replace laptop HDD with SSD, clone NVMe to NVMe SSD, clone HDD to Samsung SSD, migrate OS to SSD, etc. And you can directly use it to replace bad disk without restoring image first. You can download this software to have a try if you need to protect your computer.