Patching Images in a WIM File

Q. I've patched all the images in a Windows Imaging Format (WIM) file but even after replacing files on all the images, the WIM size hasn't shrunk.

A. It would seem logical that if you apply an update to every image in a WIM file, then the files that are now not referenced in the WIM would be removed, but this is not the process. The WIM contains a catalog of files from which each image links to. If no image links to a file anymore, the file isn't removed from the WIM file. To shrink the size of the WIM you need to export all the images from the WIM to a new WIM file. To do so, you can use the following sample command:

D:\OS Images\Vista>imagex /export install.wim * install2.wim "Lean Vista"

In this example, the * specifies to export all images. You could instead put a number to export a specific image from the source WIM (install.wim). The exported WIM will contain only the files used by the exported images.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish