Skip to content

March 6, 2011

Peeking Inside Windows Image Files (WIMs)

As everyone’s well aware, creating unattended scripts for Windows is really useful, and any time spent upfront making answer file easily pays for itself in the long wrong (even if the only thing it does is fill in the product key for you). When building answer files for operating system such as Windows 7 and Windows Server 2008, you need to write in the name of the image (from the WIM file) you want the installer to use. In some cases this is pretty straight forward, but in other cases an image file can actually have many images in it. For example, Server 2008 R2 has all of these images in its install.wim file:

  • Windows Server 2008 R2 Server Standard
  • Windows Server 2008 R2 Server Standard Core
  • Windows Server 2008 R2 Server Enterprise
  • Windows Server 2008 R2 Server Enterprise Core
  • Windows Server 2008 R2 Server Data Center
  • Windows Server 2008 R2 Server Data Center Core
  • Windows Server 2008 R2 Server Web
  • Windows Server 2008 R2 Server Web Core

If you don’t use the tools included in the Windows AIK, you should. ImageX not only mounts and builds WIM files for you, it also allows you to take a quick peek inside of them to various values. For example, in my answer file that I mentioned earlier, I needed to know the exact name of the Server 2008 Standard full install image. Do find it, use ImageX with the /info switch, followed by the path to the WIM file, and the index of the image (you’ll have to run it a few times, incrementing the index value manually, until you find what you’re looking for):

imagex /info d:\sources\install.wim 1

ImageX Tool for Windows
Copyright (C) Microsoft Corp. All rights reserved.
Version: 6.1.7600.16385

Image Information:
------------------
<IMAGE INDEX="1">
  <DIRCOUNT>13554</DIRCOUNT>
  <FILECOUNT>61495</FILECOUNT>
  <TOTALBYTES>10510509480</TOTALBYTES>
  <CREATIONTIME>
    <HIGHPART>0x01CB8936</HIGHPART>
    <LOWPART>0x389E87CA</LOWPART>
  </CREATIONTIME>
  <LASTMODIFICATIONTIME>
    <HIGHPART>0x01CB894C</HIGHPART>
    <LOWPART>0xF33D9020</LOWPART>
  </LASTMODIFICATIONTIME>
  <WINDOWS>
    <ARCH>9</ARCH>
    <PRODUCTNAME>Microsoftr Windowsr Operating System</PRODUCTNAME>
    <EDITIONID>ServerStandard</EDITIONID>
    <INSTALLATIONTYPE>Server</INSTALLATIONTYPE>
    <HAL>acpiapic</HAL>
    <PRODUCTTYPE>ServerNT</PRODUCTTYPE>
    <PRODUCTSUITE>Terminal Server</PRODUCTSUITE>
    <LANGUAGES>
      <LANGUAGE>en-US</LANGUAGE>
      <DEFAULT>en-US</DEFAULT>
    </LANGUAGES>
    <VERSION>
      <MAJOR>6</MAJOR>
      <MINOR>1</MINOR>
      <BUILD>7601</BUILD>
      <SPBUILD>17514</SPBUILD>
      <SPLEVEL>1</SPLEVEL>
    </VERSION>
    <SYSTEMROOT>WINDOWS</SYSTEMROOT>
  </WINDOWS>
  <NAME>Windows Server 2008 R2 SERVERSTANDARD</NAME>
  <DESCRIPTION>Windows Server 2008 R2 SERVERSTANDARD</DESCRIPTION>
  <FLAGS>ServerStandard</FLAGS>
  <HARDLINKBYTES>3530227190</HARDLINKBYTES>
  <DISPLAYNAME>Windows Server 2008 R2 Standard (Full Installation)</DISPLAYNAME>

  <DISPLAYDESCRIPTION>This option installs the complete installation of Windows
Server. This installation includes the entire user interface, and it supports al
l of the server roles.</DISPLAYDESCRIPTION>
</IMAGE>

If anyone knows of an easier (or better) was finding this information, please do let me know.

Read more from Administration, Windows

Share your thoughts, post a comment.

(required)
(required)

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments