Last updated on November 7th, 2018
When you download a Windows 10 or 8 ISO file, by using the Media Creation tool, you will realize that there is an "install.esd" file under the "sources" folder (X:\Source\install.esd). The install.esd file is a compressed and encrypted file that contains a full copy of the Windows operating system in a protecting container.
The install.esd file, can be used as a repair source, when using the DISM command line tool with the /Source switch to repair Windows 10 or Windows 8/8.1.
- DISM /Online /Cleanup-Image /RestoreHealth /Source:ESD:X:\Sources\install.esd
But many users complained, that even by using the correct install.esd file, the DISM tool could not find the source files required for the repair.
After many tests I realized that the DISM could not find the source files error is happened because, in the latest Windows versions the install.esd file can contain multiple Windows 10 images (install.wim files), for several Windows versions (e.g. Windows 10 Pro, Windows 10 Home, etc.) , so DISM could not find the correct files required to repair Windows. (To view all the contents of an install.esd file you can use 7zip)
In this tutorial you can find detailed instructions on how to extract install.esd file, in order to get the correct install.wim file, needed to repair Windows 10 or Windows 8/8.1 (Export Install.WIM from Install.ESD)
How to Convert install.esd to install.wim (Windows 10/8)
1. From the Windows installation media, copy the install.esd file from the "sources" folder (e.g. X:\sources\install.esd) to the root folder of drive C: *
* Note: If you are using an ISO Image file, first mount it to Windows. If you are using Windows 8/8.1, then read this article: How to mount ISO files.
3. Right click at Start menu and select Command Prompt (Admin).
4. Type cd\ to go to the root folder of drive C:\
5. Then type the following command and press Enter, in order to find which images are in the "install.esd" file:
- dism /Get-WimInfo /WimFile:install.esd
6. According to your Windows 10 installed version take note of the index number. *
* e.g.: If you have installed the Windows 10 Home edition on your system, then the Index number is "2".
7. Then give the command below to extract the corresponding to your Windows version "install.wim" file (Index number): *
- dism /export-image /SourceImageFile:install.esd /SourceIndex:IndexNumber /DestinationImageFile:install.wim /Compress:max /CheckIntegrity
1. Replace the IndexNumber according to your Windows 10 installed version.
e.g. For this example (for a Windows 10 Home based computer) we want to extract the install.wim file with Index number=2. So, the command will be:
- dism /export-image /SourceImageFile:install.esd /SourceIndex:2 /DestinationImageFile:install.wim /Compress:max /CheckIntegrity
2. If you receive the "Error 11. An attempt was made to load a program with an incorrect format" after running the above command, change the /Compress argument* from "max" to "fast" or to "none" or to "recovery".
* The /Compress argument, the type of compression used for the initial capture operation. The maximum option provides the best compression, but takes more time to capture the image. The fast option provides faster image compression, but the resulting files are larger than those compressed by using the maximumoption. This is also the default compression type that is used if you do not specify the argument. Use the recovery option to export push-button reset images. The resulting files are much smaller in size, which in turn, greatly reduce the amount of disk space needed for saving the push-button reset image on a recovery drive. The destination file must be specified with an .esd extension. The none option does not compress the captured image at all.
7. When the process is completed you should have the exported install.wim on the drive C: (C:\install.wim).
That's it! Let me know if this guide has helped you by leaving your comment about your experience. Please like and share this guide to help others.