How to rebuild a Windows Image (WIM) using ImageX tool?

11,642

Correct, you need the /Export parameter:

Imagex /export C:\WinDVD\Sources\install.wim 1 C:\WinDVD\exported\install.wim /compress maximum

(1 is the Index inside the WIM)

Share:
11,642

Related videos on Youtube

ElektroStudios
Author by

ElektroStudios

Updated on September 18, 2022

Comments

  • ElektroStudios
    ElektroStudios over 1 year

    I've previouslly mounted a WIM image using DISM where I've removed some packages and then I've unmounted it commiting changes, and now I would like to rebuild the WIM file to save filesize and compression ratio.

    I'm trying to follow the specifications of Microsoft help here but I think that I'm using the bad switch of the ImageX command for my intentions...

    The command below throws an error saying that the directory name is not valid:

    ImageX.exe /Check /Compress Maximum /Verify /Capture "C:\WinDVD\Sources\Install.wim" "1" "%UserpProfile%\Desktop\NEW Install.wim"
    

    EDIT: Now I've read about the /Export switch, but that is what I need? I want to save the full WIM file as is, not only a single image index.

  • magicandre1981
    magicandre1981 about 10 years
    Have you tried /Append?
  • ElektroStudios
    ElektroStudios about 10 years
    Investigating I've found in other example that wildcards can be used to mark all index as exportable! so just an /export "OldImage" "*" "NewImage" will do the job. thanks.