WIM to ESD RRS feed

  • Question

  • 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

    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 :)

    Friday, March 20, 2015 9:16 PM


  • Hi Legolash2o

    Windows Command prompt does have command for setting variables, but I am afraid that it doesn’t 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 didn’t test your command but I check few simple ones and it worked perfectly.


    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.



    D. Wu

    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    • Edited by Deason Wu Monday, March 23, 2015 9:20 AM
    • Marked as answer by Bruce Wooding Friday, April 3, 2015 11:11 PM
    Monday, March 23, 2015 9:20 AM