WIM to ESD

I was wondering if there was an easier way to convert a wim file to esd.

At the moment I have to type in a specific index:

dism /Export-Image /SourceImageFile:"MyImageFile.wim" /SourceIndex:1 /DestinationImageFile:"install.esd" /Compress:recovery

dism /Export-Image /SourceImageFile:"MyImageFile.wim" /SourceIndex:2 /DestinationImageFile:"install.esd" /Compress:recovery

dism /Export-Image /SourceImageFile:"MyImageFile.wim" /SourceIndex:3 /DestinationImageFile:"install.esd" /Compress:recovery

etc..

Is there a way to do all of them automatically such as:

dism /Export-Image /SourceImageFile:"MyImageFile.wim" /SourceIndex:* /DestinationImageFile:"install.esd" /Compress:recovery

Thanks :)

March 20th, 2015 5:18pm

Hi Legolash2o

Windows Command prompt does have command for setting variables, but I am afraid that it doesnt mean less work in your case.

I think you could use a batch file to get that goal, I am not a expert about script but,

FOR [%%c] IN (set) DO [command] [arguments]

Should works for you. I didnt test your command but I check few simple ones and it worked perfectly.

Samples:

FOR %F IN (1,1,5) DO DEL %F.TXT

= delete 1.txt 2.txt 3.txt 4.txt 5.txt

If you need further support you also could check your issue in TechNet scripting forum because you might get more suggestion from there.

https://gallery.technet.microsoft.com/scriptcenter

Regards

Free Windows Admin Tool Kit Click here and download it now
March 23rd, 2015 5:21am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics