SOLVED Any changes to .esd files preventing mounting with DISM?

Joined
Oct 1, 2014
Messages
2,328
Reaction score
357
I have been having a hard time mounting a recent Win 10 .esd or .wim file. I keep getting the An attempt was made to load a program with an incorrect format.

I don't seem to have a problem mounting Win 8.1 images so I was wondering if recent Win 10 builds have been modified to prevent normal folks mounting the files.. I have tried with the ADK tools and get the same error..

I also can't remember the exact command for mounting esd files but I thought it was something like this.

dism /mount-image /ImageFile:esd:E:\Images\Install.esd /Index:6 /MountDir:E:\Images\MountHere /CheckIntegrity /readonly

If I need to use some special procedure to export the Install.wim I might try but the one I have now seems to provide good information..

Thanks..
 
Joined
Oct 1, 2014
Messages
2,328
Reaction score
357
Thanks Wolfie, I have been converting the way the tutorials show in about any way possible. But I may have finally made some progress. I went to the site below and followed their instructions for exporting the file and used there options and file locations.

I copied the install.esd file from a new .iso download I did last night and created the install.wim file.

When I used the dism /Mount-Image process, it actually worked and I can pull out the winre.wim file I need.

I do not know why my other attempts failed, possibly the /Compress:max option or just the new install.esd file. I will play with it on another computer to see if I can duplicate my prior attempts using the new file. But for now the problem is solved..


Thanks again..
 
Joined
Oct 1, 2014
Messages
2,328
Reaction score
357
I did the same thing on my original computer but did not use the compress option and the mount failed. I have noticed that the install.wim files which failed the mounting were smaller than the ones that worked. On the failed ones, no compressed option, they were around 3.3 GBs. That same file on the ones that were bootable were around 4 GBs..

I will be using the /compress:max option from now on ... if I ever do this again... :eek:
 
Joined
Apr 22, 2017
Messages
5,468
Reaction score
682
Hi Saltgrass,

I have never done it myself, I am glad that you have at least found a solution that works for you. :)
 
Joined
Jan 27, 2016
Messages
794
Reaction score
80
I have been having a hard time mounting a recent Win 10 .esd or .wim file. I keep getting the An attempt was made to load a program with an incorrect format.

I don't seem to have a problem mounting Win 8.1 images so I was wondering if recent Win 10 builds have been modified to prevent normal folks mounting the files.. I have tried with the ADK tools and get the same error..

I also can't remember the exact command for mounting esd files but I thought it was something like this.

dism /mount-image /ImageFile:esd:E:\Images\Install.esd /Index:6 /MountDir:E:\Images\MountHere /CheckIntegrity /readonly

If I need to use some special procedure to export the Install.wim I might try but the one I have now seems to provide good information..

Thanks..
this is what i use to mount image. I do make 3 images (Ent, Pro and WSPro)
Dism /mount-wim /wimfile:E:\pro\install.wim /index:1 /mountDir:E:\mount
or
DISM.exe /Apply-Image /ImageFile:G:\esd\install.esd /Index:1 /ApplyDir:G:\mount

is is much easier to convert the ESD to Wim or wim to esd.
dism /Export-Image /SourceImageFile:"x:\install.wim or .esd" /SourceIndex:1 /DestinationImageFile:"y:\install.esd or .wim" /Compress:recovery /checkintegrity
 
Last edited:
Joined
Oct 1, 2014
Messages
2,328
Reaction score
357
Thanks Snuffy, the question I am trying to answer is why does not including an optional switch, /Compress, keep the Export operation from making a mountable image.

Since the /Export-Image command is suppose to use the default setting of /Compress:fast if the command is not included, I am going to try running the command with the /Compress:fast and without the /Compress option to see what happens. I see no reason why the command should produce a 3.2 GB image, which will not mount, instead of the 4.0 GB image with will mount..

I use Index 6 (install.esd) for my Win 10 Pro work and will do my testing using it. Maybe some bug has gotten into the command which is causing the faulty image to be created.. Since I am just mounting these images and not using them as Push-Button images, I don't need to use the /Compress:recovery setting, which is more compression than even :max.. and requires the resulting image to be designated as .esd.


If I find anything interesting, I will post back, thanks again..
 
Joined
Jan 27, 2016
Messages
794
Reaction score
80
are you verifiing the images contained in the ESD or Wim for [proper].
dism /get-wiminfo /wimfile:E:\pro\install.wim
I also extract the image:# to different E:\Pro so that I always use image:1 then extract image:# TO E:\Ent since my clients only use 1 of 4.
most are Home, Pro and Ent while 2 use WSPro.


/Compress specifies the type of compression used for the initial capture operation. The /Compress argument does not apply when you export an image to an existing .wim file, you can only use this argument when you export an image to a new .wim file. 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 maximum option. 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.
--------------------------------
[/Compress:{fast|max|none|recovery}]

my reference is
 
Last edited:
Joined
Oct 1, 2014
Messages
2,328
Reaction score
357
Your reference uses the same description as mine. I am creating new .wim files. Since you can export multiple indexes (Home, Pro, etc.) into the same .wim file, your bolded text refers to such a situation.

I am currently exporting the install.esd using the versions of /Compress so I can see which ones will mount and which ones will not.
 
Joined
Jan 27, 2016
Messages
794
Reaction score
80
I would need to see what your error code is if you can not mount a Wim or ESD. and only if your wim or esd is corrupt should it not mount.
and most that if find with others if a failure to mount was caused due to a failure to unmount correctly. caused by failure to add or modify improperly. (Then you should receive a ERROR Msg.) then make a new mount (if the mount folder is corrupt) you have to made a new not just rename.
 
Joined
Oct 1, 2014
Messages
2,328
Reaction score
357
The fast option provides faster image compression, but the resulting files are larger than those compressed by using the maximum option. This is also the default compression type that is used if you do not specify the argument.
Below is an attachment showing different versions of .wim file using different /Compress options. What I do not understand is, why is the size of the no option image much smaller than the image using Fast compression since I believe it should be the same command if you do not specify a /Compress option..

All versions of the extracted image were bootable except for the one which did not include the /Compress argument.

The command I use..
C:\Win10USB>dism /export-image /SourceImageFile:install.esd /SourceIndex:6 /DestinationImageFile:Installnoop.wim /Compress:fast

The error with a failed mount is:

Error: 11
An attempt was made to load a program with an incorrect format.


MntImages.JPG
 
Joined
Jan 27, 2016
Messages
794
Reaction score
80
looks strange to me unless something in the orig name (noop) if you change noop to different what happens.
 
Joined
Oct 1, 2014
Messages
2,328
Reaction score
357
Yesterday I was using different names and it did the same thing. The fact the resulting .wim file size is hard to understand. The Dism log has an entry about not being able to read the .wim header..

Either I am misunderstanding and the /Compress argument is required for new .wim files or there is a bug..

DISM DISM WIM Provider: PID=14224 [WIMCreateFile:(430) -> Fail to read WIM header] C:\Win10USB\installnoop.wim (HRESULT=0x8007000B
 
Joined
Jan 27, 2016
Messages
794
Reaction score
80
I do not for the most part use /compress: so it must be a bug in your system, I am also on Insider 19569 and use ADK 19041 if that helps.
 
Joined
Oct 1, 2014
Messages
2,328
Reaction score
357
OK, it would be a bug in three systems but I will keep working on it. I am done with the original process that started this so I can slow down and look more closely..

Thanks again..
 
Joined
Jan 27, 2016
Messages
794
Reaction score
80
genually the error code you posted is
UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
---------------------

and B is the same issue,
and as far back as XP, can also be a stack overflow. cache setting not clearing, try sfc/scannow among other, also might caused by OC. the list of what might cause is endless.
 
Last edited:
Joined
Oct 1, 2014
Messages
2,328
Reaction score
357
I know one thing that keeps it from happening, use the /Compress argument when the .wim files is exported.. ;)

The error 0x8007000B means:

ERROR_BAD_FORMAT
11 (0xB)
An attempt was made to load a program with an incorrect format.
 
Joined
Jan 29, 2023
Messages
1
Reaction score
0
Thanks for the info regarding the /Compress option!

I've been trying to get dism /get-wiminfo
To work on the latest win 10 (circa this month!) to repair an endless unreadable BCD booting from USB. If it can.

I couldn't mount my .ESD in any form, does the /Compress option come into play here?
As in general dism use of an image?

Regardless, successfully exported index 1, thanks for your info (all MS answers were reinstall.... Or worse /fixboot/rebuild BCD which doesn't go anywhere.).
But my HD is still (with errors on winload.efi on boot) there!

Now , I can try to solve the problem! If I can takeown / replace it.
Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top