6

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.

ElektroStudios
  • 1,590
  • 7
  • 22
  • 49

1 Answers1

7

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)

magicandre1981
  • 97,301
  • 30
  • 179
  • 245
  • Thanks but if I have for exaple a WIM image that contains two images named "Basic" (Index 1) and other image named "Professional" (Index 2), I can't save/compress/export both images in a single WIM (like the original WIM) using ImageX? then how to really rebuild an entire WIM file? – ElektroStudios Apr 09 '14 at 18:05
  • Have you tried /Append? – magicandre1981 Apr 09 '14 at 18:10
  • 1
    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. – ElektroStudios Apr 14 '14 at 03:19