Friday, December 9, 2011

How to Mount an Operating System Image using imagex

imagex is a tool that is included with the Windows Automated Installation Kit (WAIK or AIK) to create, modify, and deploy imaged versions of an underlying operating system such as Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2. imagex can be used for everything from creating an offline backup of an existing system for disaster recovery to capturing a standardized system image that can be deployed using Windows Deployment Services (WDS) or System Center Configuration Manager (SCCM).

In this post, I am going to demonstrate how to mount the WIM (Windows Imaging Format) for Windows Vista, Windows 7, Windows Server 2008, and Windows Server 2008 R2 from the installation media for the purposes of recovering an original file. To start out, the installation media (or a custom .WIM) for the operating system needs to be available and the Windows Automated Installation Kit needs to be installed. The general process for each of the operating systems is below,
  1. Identify the images included in the WIM and select the proper one to mount. This is determined using the imagex /info <wim_file> command.
  2. Mount the image to a temporary directory. This is performed using the imagex /mount <wim_file> <img_number> <mount_dir>. To mount the image as writeable, use the imagex /mountrw... command
  3. Recover the file(s) from the <mount_dir> directory used in the other steps.
  4. Unmount the image imagex /unmount <mount_dir>. Note that since we are not changing anything, we do not need to use the commit option for the unmount command. If you do change anything (and used the mountrw option above), be sure to use the imagex /unmount /commit . Not using the /commit will cause the changes to be ignored.
Note that by default, the imagex tool is located in C:\Program Files\Windows AIK\Tools\amd64 for 64 bit systems and C:\Program Files\Windows AIK\Tools\x86 for 32 bit systems.

Windows Vista

To start out, I mounted the Windows Vista ISO using Virtual CloneDrive to E:. The WIM file used for installing new systems is in E:\sources\install.wim. E:\sources\boot.wim is the Windows Preinstallation Environment (WinPE). WinPE is used to start and run the installation process.


c:\Program Files\Windows AIK\Tools\amd64>imagex /info e:\sources\install.wim

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

WIM Information:
----------------
Path:        e:\sources\install.wim
GUID:        {9d6995bd-4791-4b7a-97c7-c55c12738a9f}
Image Count: 1
Compression: LZX
Part Number: 1/1
Attributes:  0xc
             Integrity info
             Relative path junction


Available Image Choices:
------------------------
<wim>
  <totalbytes>2863295665</totalbytes>
  <img index="1" />
    <name>Windows Vista ENTERPRISE</name>
    <description>Windows Vista ENTERPRISE</description>
    <flags>ENTERPRISE</flags>
    <windows>
      <arch>9</arch>
      <productname>Microsoftr Windowsr Operating System</productname>
      <hal>acpiapic</hal>
      <producttype>WinNT</producttype>
      <productsuite>Terminal Server</productsuite>
      <languages>
        <language>en-US</language>
        <default>en-US</default>
      </languages>
      <version>
        <major>6</major>
        <minor>0</minor>
        <build>6002</build>
        <spbuild>18005</spbuild>
      </version>
      <systemroot>WINDOWS</systemroot>
    </windows>
    <dircount>13739</dircount>
    <filecount>70563</filecount>
    <totalbytes>12570635278</totalbytes>
    <creationtime>
      <highpart>0x01C9BADA</highpart>
      <lowpart>0x3AFF6E12</lowpart>
    </creationtime>
    <lastmodificationtime>
      <highpart>0x01C9BAEC</highpart>
      <lowpart>0x9D75600C</lowpart>
    </lastmodificationtime>
    <displayname>Windows Vista Enterprise</displayname>
    <displaydescription>Windows Vista Enterprise</displaydescription>
  </wim> 
 
imagex shows that there is only one image available (Windows Vista Enterprise). Other DVDs will likely have the other editions (Windows Vista Home Basic, Windows Vista Home Premium, Windows Vista Business, and Windows Vista Ultimate).

I mounted the Windows Vista Enterprise Image (index 1) to an empty directory that I created, c:\mounted_images.


imagex /mount e:\sources\install.wim 1 c:\mounted_images

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

Mounting: [e:\sources\install.wim, 1] -> [c:\mounted_images]...

[ 100% ] Mounting progress

Successfully mounted image.

Total elapsed time: 9 min 21 sec
 
  
From the c:\mounted_images directory, it is apparent that this is a full base install of Windows Vista. Files can be copied out of the directory and the image can be unmounted.

c:\Program Files\Windows AIK\Tools\amd64>imagex /unmount c:\mounted_images

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

Unmounting: [c:\mounted_images]...

[ 100% ] Mount cleanup progress

Windows Server 2008

To start out, I mounted the Windows Server 2008 ISO using Virtual CloneDrive to E:. The WIM file used for installing new systems is in E:\sources\install.wim. E:\sources\boot.wim is the Windows Preinstallation Environment (WinPE). WinPE is used to start and run the installation process.

 
c:\Program Files\Windows AIK\Tools\amd64>imagex /info e:\sources\install.wim

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

WIM Information:
----------------
Path:        e:\sources\install.wim
GUID:        {5207b5bd-a532-4e0c-9637-9a11463c9b59}
Image Count: 6
Compression: LZX
Part Number: 1/1
Attributes:  0xc
             Integrity info
             Relative path junction


Available Image Choices:
------------------------
<wim>
  <totalbytes>2326628687</totalbytes>
  <img index="1" />
    <name>Windows Longhorn SERVERSTANDARD</name>
    <description>Windows Longhorn SERVERSTANDARD</description>
    <flags>SERVERSTANDARD</flags>
    <windows>
      <arch>9</arch>
      <productname>Microsoftr Windowsr Operating System</productname>
      <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>0</minor>
        <build>6001</build>
        <spbuild>18000</spbuild>
      </version>
      <systemroot>WINDOWS</systemroot>
    </windows>
    <dircount>11003</dircount>
    <filecount>51672</filecount>
    <totalbytes>8784297519</totalbytes>
    <creationtime>
      <highpart>0x01C85AAD</highpart>
      <lowpart>0xF456B173</lowpart>
    </creationtime>
    <lastmodificationtime>
      <highpart>0x01C85ABE</highpart>
      <lowpart>0xF6817FE5</lowpart>
    </lastmodificationtime>
    <displayname>Windows Server 2008 Standard (Full Installation)</displayname>
    <displaydescription>This option installs the complete installation of Window
s Server. This installation includes the entire user interface, and it supports
all of the server roles.</displaydescription>
  
  <img index="2" />
    <name>Windows Longhorn SERVERENTERPRISE</name>
    <description>Windows Longhorn SERVERENTERPRISE</description>
    <flags>SERVERENTERPRISE</flags>
    <windows>
      <arch>9</arch>
      <productname>Microsoftr Windowsr Operating System</productname>
      <hal>acpiapic</hal>
      <producttype>ServerNT</producttype>
      <productsuite>Enterprise</productsuite>
      <languages>
        <language>en-US</language>
        <default>en-US</default>
      </languages>
      <version>
        <major>6</major>
        <minor>0</minor>
        <build>6001</build>
        <spbuild>18000</spbuild>
      </version>
      <systemroot>WINDOWS</systemroot>
    </windows>
    <dircount>11046</dircount>
    <filecount>51836</filecount>
    <totalbytes>8792036862</totalbytes>
    <creationtime>
      <highpart>0x01C85AAD</highpart>
      <lowpart>0xC5BFCFD0</lowpart>
    </creationtime>
    <lastmodificationtime>
      <highpart>0x01C85ABF</highpart>
      <lowpart>0x1B2C3822</lowpart>
    </lastmodificationtime>
    <displayname>Windows Server 2008 Enterprise (Full Installation)</displayname>
    <displaydescription>This option installs the complete installation of Window
s Server. This installation includes the entire user interface, and it supports
all of the server roles.</displaydescription>
  
  <img index="3" />
    <name>Windows Longhorn SERVERDATACENTER</name>
    <description>Windows Longhorn SERVERDATACENTER</description>
    <flags>SERVERDATACENTER</flags>
    <windows>
      <arch>9</arch>
      <productname>Microsoftr Windowsr Operating System</productname>
      <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>0</minor>
        <build>6001</build>
        <spbuild>18000</spbuild>
      </version>
      <systemroot>WINDOWS</systemroot>
    </windows>
    <dircount>11045</dircount>
    <filecount>51829</filecount>
    <totalbytes>8792568645</totalbytes>
    <creationtime>
      <highpart>0x01C85AAE</highpart>
      <lowpart>0xBB09805E</lowpart>
    </creationtime>
    <lastmodificationtime>
      <highpart>0x01C85ABF</highpart>
      <lowpart>0x37F84366</lowpart>
    </lastmodificationtime>
    <displayname>Windows Server 2008 Datacenter (Full Installation)</displayname>
    <displaydescription>This option installs the complete installation of Window
s Server. This installation includes the entire user interface, and it supports
all of the server roles.</displaydescription>
  
  <img index="4" />
    <name>Windows Longhorn SERVERSTANDARDCORE</name>
    <description>Windows Longhorn SERVERSTANDARDCORE</description>
    <flags>SERVERSTANDARD</flags>
    <windows>
      <arch>9</arch>
      <productname>Microsoftr Windowsr Operating System</productname>
      <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>0</minor>
        <build>6001</build>
        <spbuild>18000</spbuild>
      </version>
      <systemroot>WINDOWS</systemroot>
    </windows>
    <dircount>5235</dircount>
    <filecount>21316</filecount>
    <totalbytes>2512939954</totalbytes>
    <creationtime>
      <highpart>0x01C85AA6</highpart>
      <lowpart>0x042D7F00</lowpart>
    </creationtime>
    <lastmodificationtime>
      <highpart>0x01C85ABF</highpart>
      <lowpart>0x4758A12D</lowpart>
    </lastmodificationtime>
    <displayname>Windows Server 2008 Standard (Server Core Installation)</displayname>
    <displaydescription>This option installs a minimal installation of Windows S
erver without the standard Windows user interface, and with a subset of server r
oles that can be managed from a command prompt, reducing management requirements
 and attack surface.</displaydescription>
  
  <img index="5" />
    <name>Windows Longhorn SERVERENTERPRISECORE</name>
    <description>Windows Longhorn SERVERENTERPRISECORE</description>
    <flags>SERVERENTERPRISE</flags>
    <windows>
      <arch>9</arch>
      <productname>Microsoftr Windowsr Operating System</productname>
      <hal>acpiapic</hal>
      <producttype>ServerNT</producttype>
      <productsuite>Enterprise</productsuite>
      <languages>
        <language>en-US</language>
        <default>en-US</default>
      </languages>
      <version>
        <major>6</major>
        <minor>0</minor>
        <build>6001</build>
        <spbuild>18000</spbuild>
      </version>
      <systemroot>WINDOWS</systemroot>
    </windows>
    <dircount>5266</dircount>
    <filecount>21400</filecount>
    <totalbytes>2522686340</totalbytes>
    <creationtime>
      <highpart>0x01C85AA6</highpart>
      <lowpart>0xBB3416BA</lowpart>
    </creationtime>
    <lastmodificationtime>
      <highpart>0x01C85ABF</highpart>
      <lowpart>0x568E146A</lowpart>
    </lastmodificationtime>
    <displayname>Windows Server 2008 Enterprise (Server Core Installation)</displayname>
    <displaydescription>This option installs a minimal installation of Windows S
erver without the standard Windows user interface, and with a subset of server r
oles that can be managed from a command prompt, reducing management requirements
 and attack surface.</displaydescription>
  
  <img index="6" />
    <name>Windows Longhorn SERVERDATACENTERCORE</name>
    <description>Windows Longhorn SERVERDATACENTERCORE</description>
    <flags>SERVERDATACENTER</flags>
    <windows>
      <arch>9</arch>
      <productname>Microsoftr Windowsr Operating System</productname>
      <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>0</minor>
        <build>6001</build>
        <spbuild>18000</spbuild>
      </version>
      <systemroot>WINDOWS</systemroot>
    </windows>
    <dircount>5266</dircount>
    <filecount>21397</filecount>
    <totalbytes>2522615418</totalbytes>
    <creationtime>
      <highpart>0x01C85AA7</highpart>
      <lowpart>0x063D88A0</lowpart>
    </creationtime>
    <lastmodificationtime>
      <highpart>0x01C85ABF</highpart>
      <lowpart>0x65A488EE</lowpart>
    </lastmodificationtime>
    <displayname>Windows Server 2008 Datacenter (Server Core Installation)</displayname>
    <displaydescription>This option installs a minimal installation of Windows S
erver without the standard Windows user interface, and with a subset of server r
oles that can be managed from a command prompt, reducing management requirements
 and attack surface.</displaydescription>
  </wim>



imagex shows a number of images available (Full installations and Core installations of each edition of Windows Server 2008).

I mounted the Windows Server 2008 Enterprise Image (index 2) to an empty directory that I created, c:\mounted_images.



imagex /mount e:\sources\install.wim 2 c:\mounted_images

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

Mounting: [e:\sources\install.wim, 2] -> [c:\mounted_images]...

[ 100% ] Mounting progress

Successfully mounted image.

Total elapsed time: 8 min 41 sec
 
  
From the c:\mounted_images directory, it is apparent that this is a full base install of Windows Server 2008 Enterprise. Files can be copied out of the directory and the image can be unmounted.

c:\Program Files\Windows AIK\Tools\amd64>imagex /unmount c:\mounted_images\

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

Unmounting: [c:\mounted_images\]...

[ 100% ] Mount cleanup progress

Successfully unmounted image.

Total elapsed time: 50 sec 
 

Windows 7

To start out, I mounted the Windows 7 ISO using Virtual CloneDrive to E:. The WIM file used for installing new systems is in E:\sources\install.wim. E:\sources\boot.wim is the Windows Preinstallation Environment (WinPE). WinPE is used to start and run the installation process.


c:\Program Files\Windows AIK\Tools\amd64>imagex /info e:\sources\install.wim

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

WIM Information:
----------------
Path:        e:\sources\install.wim
GUID:        {7bf33c3a-c5ea-442f-bc19-e23bb486a301}
Image Count: 1
Compression: LZX
Part Number: 1/1
Attributes:  0xc
             Integrity info
             Relative path junction


Available Image Choices:
------------------------
<wim>
  <totalbytes>2760348780</totalbytes>
  <img index="1" />
    <dircount>13629</dircount>
    <filecount>64547</filecount>
    <totalbytes>11912905130</totalbytes>
    <creationtime>
      <highpart>0x01CA0446</highpart>
      <lowpart>0xE89FF88A</lowpart>
    </creationtime>
    <lastmodificationtime>
      <highpart>0x01CA0456</highpart>
      <lowpart>0xC6F78534</lowpart>
    </lastmodificationtime>
    <windows>
      <arch>9</arch>
      <productname>Microsoftr Windowsr Operating System</productname>
      <editionid>Enterprise</editionid>
      <installationtype>Client</installationtype>
      <hal>acpiapic</hal>
      <producttype>WinNT</producttype>
      <productsuite>Terminal Server</productsuite>
      <languages>
        <language>en-US</language>
        <default>en-US</default>
      </languages>
      <version>
        <major>6</major>
        <minor>1</minor>
        <build>7600</build>
        <spbuild>16385</spbuild>
        <splevel>0</splevel>
      </version>
      <systemroot>WINDOWS</systemroot>
    </windows>
    <name>Windows 7 ENTERPRISE</name>
    <description>Windows 7 ENTERPRISE</description>
    <flags>Enterprise</flags>
    <hardlinkbytes>4805832700</hardlinkbytes>
    <displayname>Windows 7 Enterprise</displayname>
    <displaydescription>Windows 7 Enterprise</displaydescription>
  </wim>

 
 
imagex shows that there is only one image available (Windows 7 Enterprise). Other DVDs will likely have the other images (Windows 7 Starter, Windows 7 Home Premium, Windows 7 Professional, and Windows 7 Ultimate).

I mounted the Windows 7 Enterprise Image (index 1) to an empty directory that I created, c:\mounted_images.


imagex /mount e:\sources\install.wim 1 c:\mounted_images

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

Mounting: [e:\sources\install.wim, 1] -> [c:\mounted_images]...

[ 100% ] Mounting progress

Successfully mounted image.

Total elapsed time: 7 min 5 sec 
  
From the c:\mounted_images directory, it is apparent that this is a full base install of Windows 7. Files can be copied out of the directory and the image can be unmounted.

c:\Program Files\Windows AIK\Tools\amd64>imagex /unmount c:\mounted_images\

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

Unmounting: [c:\mounted_images\]...

[ 100% ] Mount cleanup progress

Successfully unmounted image.

Total elapsed time: 55 sec
 

Windows Server 2008 R2

To start out, I mounted the Windows Server 2008 R2 ISO using Virtual CloneDrive to E:. The WIM file used for installing new systems is in E:\sources\install.wim. E:\sources\boot.wim is the Windows Preinstallation Environment (WinPE). WinPE is used to start and run the installation process.


c:\Program Files\Windows AIK\Tools\amd64>imagex /info e:\sources\install.wim 

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

WIM Information:
----------------
Path:        e:\sources\install.wim
GUID:        {682adb12-aef3-4ff3-b17e-13764cbdceff}
Image Count: 8
Compression: LZX
Part Number: 1/1
Attributes:  0xc
             Integrity info
             Relative path junction


Available Image Choices:
------------------------
<wim>
  <totalbytes>2643080205</totalbytes>
  <img index="1" />
    <dircount>13393</dircount>
    <filecount>59580</filecount>
    <totalbytes>10124170912</totalbytes>
    <creationtime>
      <highpart>0x01CA0446</highpart>
      <lowpart>0x8E44DCAF</lowpart>
    </creationtime>
    <lastmodificationtime>
      <highpart>0x01CA0457</highpart>
      <lowpart>0xDF05F67A</lowpart>
    </lastmodificationtime>
    <windows>
      <arch>9</arch>
      <productname>Microsoft® Windows® 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>7600</build>
        <spbuild>16385</spbuild>
        <splevel>0</splevel>
      </version>
      <systemroot>WINDOWS</systemroot>
    </windows>
    <name>Windows Server 2008 R2 SERVERSTANDARD</name>
    <description>Windows Server 2008 R2 SERVERSTANDARD</description>
    <flags>ServerStandard</flags>
    <hardlinkbytes>3549542525</hardlinkbytes>
    <displayname>Windows Server 2008 R2 Standard (Full Installation)</displayname>
    <displaydescription>This option installs the complete installation of </displaydescription></wim></pre>
<pre>Windows Server. This installation includes the entire user interface, and </pre>
<pre>it supports all of the server roles.
  
  <img index="2" />
    <dircount>6691</dircount>
    <filecount>27989</filecount>
    <totalbytes>3452482925</totalbytes>
    <creationtime>
      <highpart>0x01CA0441</highpart>
      <lowpart>0x2418C48E</lowpart>
    </creationtime>
    <lastmodificationtime>
      <highpart>0x01CA0458</highpart>
      <lowpart>0x0CF4C462</lowpart>
    </lastmodificationtime>
    <windows>
      <arch>9</arch>
      <productname>Microsoft® Windows® Operating System</productname>
      <editionid>ServerStandard</editionid>
      <installationtype>Server Core</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>7600</build>
        <spbuild>16385</spbuild>
        <splevel>0</splevel>
      </version>
      <systemroot>WINDOWS</systemroot>
    </windows>
    <name>Windows Server 2008 R2 SERVERSTANDARDCORE</name>
    <description>Windows Server 2008 R2 SERVERSTANDARDCORE</description>
    <flags>ServerStandardCore</flags>
    <hardlinkbytes>1059628766</hardlinkbytes>
    <displayname>Windows Server 2008 R2 Standard (Server Core Installation)</displayname>
    <displaydescription>This option installs a minimal installation of </displaydescription></pre>
<pre>Windows Server without the standard Windows user interface, and with a </pre>
<pre>subset of server roles that can be managed from a command prompt, reducing </pre>
<pre>management requirements and attack surface.
  
  <img index="3" />
    <dircount>13393</dircount>
    <filecount>59572</filecount>
    <totalbytes>10124270277</totalbytes>
    <creationtime>
      <highpart>0x01CA0446</highpart>
      <lowpart>0x8E44DCAF</lowpart>
    </creationtime>
    <lastmodificationtime>
      <highpart>0x01CA0458</highpart>
      <lowpart>0x5CEB62E6</lowpart>
    </lastmodificationtime>
    <windows>
      <arch>9</arch>
      <productname>Microsoft® Windows® Operating System</productname>
      <editionid>ServerEnterprise</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>7600</build>
        <spbuild>16385</spbuild>
        <splevel>0</splevel>
      </version>
      <systemroot>WINDOWS</systemroot>
    </windows>
    <name>Windows Server 2008 R2 SERVERENTERPRISE</name>
    <description>Windows Server 2008 R2 SERVERENTERPRISE</description>
    <flags>ServerEnterprise</flags>
    <hardlinkbytes>3549432382</hardlinkbytes>
    <displayname>Windows Server 2008 R2 Enterprise (Full Installation)</displayname>
    <displaydescription>This option installs the complete installation of </displaydescription></pre>
<pre>Windows Server. This installation includes the entire user interface, and </pre>
<pre>it supports all of the server roles.
  
  <img index="4" />
    <dircount>6691</dircount>
    <filecount>27981</filecount>
    <totalbytes>3452375464</totalbytes>
    <creationtime>
      <highpart>0x01CA0441</highpart>
      <lowpart>0x2418C48E</lowpart>
    </creationtime>
    <lastmodificationtime>
      <highpart>0x01CA0458</highpart>
      <lowpart>0x9BE7A284</lowpart>
    </lastmodificationtime>
    <windows>
      <arch>9</arch>
      <productname>Microsoft® Windows® Operating System</productname>
      <editionid>ServerEnterprise</editionid>
      <installationtype>Server Core</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>7600</build>
        <spbuild>16385</spbuild>
        <splevel>0</splevel>
      </version>
      <systemroot>WINDOWS</systemroot>
    </windows>
    <name>Windows Server 2008 R2 SERVERENTERPRISECORE</name>
    <description>Windows Server 2008 R2 SERVERENTERPRISECORE</description>
    <flags>ServerEnterpriseCore</flags>
    <hardlinkbytes>1059518629</hardlinkbytes>
    <displayname>Windows Server 2008 R2 Enterprise (Server Core Installation)</displayname>
    <displaydescription>This option installs a minimal installation of </displaydescription></pre>
<pre>Windows Server without the standard Windows user interface, and with a subset </pre>
<pre>of server roles that can be managed from a command prompt, reducing management </pre>
<pre>requirements and attack surface.
  
  <img index="5" />
    <dircount>13393</dircount>
    <filecount>59569</filecount>
    <totalbytes>10124293398</totalbytes>
    <creationtime>
      <highpart>0x01CA0446</highpart>
      <lowpart>0x8E44DCAF</lowpart>
    </creationtime>
    <lastmodificationtime>
      <highpart>0x01CA0458</highpart>
      <lowpart>0xF7827C7C</lowpart>
    </lastmodificationtime>
    <windows>
      <arch>9</arch>
      <productname>Microsoft® Windows® Operating System</productname>
      <editionid>ServerDatacenter</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>7600</build>
        <spbuild>16385</spbuild>
        <splevel>0</splevel>
      </version>
      <systemroot>WINDOWS</systemroot>
    </windows>
    <name>Windows Server 2008 R2 SERVERDATACENTER</name>
    <description>Windows Server 2008 R2 SERVERDATACENTER</description>
    <flags>ServerDataCenter</flags>
    <hardlinkbytes>3549388133</hardlinkbytes>
    <displayname>Windows Server 2008 R2 Datacenter (Full Installation)</displayname>
    <displaydescription>This option installs the complete installation of </displaydescription></pre>
<pre>Windows Server. This installation includes the entire user interface, and </pre>
<pre>it supports all of the server roles.
  
  <img index="6" />
    <dircount>6691</dircount>
    <filecount>27978</filecount>
    <totalbytes>3452336241</totalbytes>
    <creationtime>
      <highpart>0x01CA0441</highpart>
      <lowpart>0x2418C48E</lowpart>
    </creationtime>
    <lastmodificationtime>
      <highpart>0x01CA0459</highpart>
      <lowpart>0x3541A358</lowpart>
    </lastmodificationtime>
    <windows>
      <arch>9</arch>
      <productname>Microsoft® Windows® Operating System</productname>
      <editionid>ServerDatacenter</editionid>
      <installationtype>Server Core</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>7600</build>
        <spbuild>16385</spbuild>
        <splevel>0</splevel>
      </version>
      <systemroot>WINDOWS</systemroot>
    </windows>
    <name>Windows Server 2008 R2 SERVERDATACENTERCORE</name>
    <description>Windows Server 2008 R2 SERVERDATACENTERCORE</description>
    <flags>ServerDataCenterCore</flags>
    <hardlinkbytes>1059474466</hardlinkbytes>
    <displayname>Windows Server 2008 R2 Datacenter (Server Core Installation)</displayname>
    <displaydescription>This option installs a minimal installation </displaydescription></pre>
<pre>of Windows Server without the standard Windows user interface, and with a </pre>
<pre>subset of server roles that can be managed from a command prompt, reducing </pre>
<pre>management requirements and attack surface.
  
  <img index="7" />
    <dircount>13177</dircount>
    <filecount>58761</filecount>
    <totalbytes>10012085727</totalbytes>
    <creationtime>
      <highpart>0x01CA0446</highpart>
      <lowpart>0x8E44DCAF</lowpart>
    </creationtime>
    <lastmodificationtime>
      <highpart>0x01CA0459</highpart>
      <lowpart>0x904D593C</lowpart>
    </lastmodificationtime>
    <windows>
      <arch>9</arch>
      <productname>Microsoft® Windows® Operating System</productname>
      <editionid>ServerWeb</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>7600</build>
        <spbuild>16385</spbuild>
        <splevel>0</splevel>
      </version>
      <systemroot>WINDOWS</systemroot>
    </windows>
    <name>Windows Server 2008 R2 SERVERWEB</name>
    <description>Windows Server 2008 R2 SERVERWEB</description>
    <flags>ServerWeb</flags>
    <hardlinkbytes>3533354252</hardlinkbytes>
    <displayname>Windows Web Server 2008 R2 (Full Installation)</displayname>
    <displaydescription>This option installs the complete installation of </displaydescription></pre>
<pre>Windows Server. This installation includes the entire user interface, and </pre>
<pre>it supports all of the server roles.
  
  <img index="8" />
    <dircount>6676</dircount>
    <filecount>27904</filecount>
    <totalbytes>3443413672</totalbytes>
    <creationtime>
      <highpart>0x01CA0441</highpart>
      <lowpart>0x2418C48E</lowpart>
    </creationtime>
    <lastmodificationtime>
      <highpart>0x01CA0459</highpart>
      <lowpart>0xC6A29976</lowpart>
    </lastmodificationtime>
    <windows>
      <arch>9</arch>
      <productname>Microsoft® Windows® Operating System</productname>
      <editionid>ServerWeb</editionid>
      <installationtype>Server Core</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>7600</build>
        <spbuild>16385</spbuild>
        <splevel>0</splevel>
      </version>
      <systemroot>WINDOWS</systemroot>
    </windows>
    <name>Windows Server 2008 R2 SERVERWEBCORE</name>
    <description>Windows Server 2008 R2 SERVERWEBCORE</description>
    <flags>ServerWebCore</flags>
    <hardlinkbytes>1059539949</hardlinkbytes>
    <displayname>Windows Web Server 2008 R2 (Server Core Installation)</displayname>
    <displaydescription>This option installs a minimal installation of Windows Server </displaydescription>

without the standard Windows user interface, and with a subset of server roles that 
can be managed from a command prompt, reducing management requirements and attack 
surface.
  

 
 
imagex shows 8 images available (Full installations and Core installations of each edition of Windows Server 2008 R2 editions).

I mounted the Windows Server 2008 R2 Enterprise Image (index 3) to an empty directory that I created, c:\mounted_images.


imagex /mount e:\sources\install.wim 3 c:\mounted_images

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

Mounting: [e:\sources\install.wim, 3] -> [c:\mounted_images]...

[ 100% ] Mounting progress

Successfully mounted image.

Total elapsed time: 7 min 6 sec 
  
From the c:\mounted_images directory, it is apparent that this is a full base install of Windows Server 2008 R2 Enterprise. Files can be copied out of the directory and the image can be unmounted.

c:\Program Files\Windows AIK\Tools\amd64>imagex /unmount c:\mounted_images\

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

Unmounting: [c:\mounted_images\]...

[ 100% ] Mount cleanup progress

Successfully unmounted image.

Total elapsed time: 56 sec 
 

Windows 8 Developer Preview

To start out, I mounted the Windows 8 Developer Preview using Virtual CloneDrive to E:. The WIM file used for installing new systems is in E:\sources\install.wim. E:\sources\boot.wim is the Windows Preinstallation Environment (WinPE). WinPE is used to start and run the installation process.


c:\Program Files\Windows AIK\Tools\amd64>imagex /info e:\sources\install.wim

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

WIM Information:
----------------
Path:        e:\sources\install.wim
GUID:        {d9bfb29e-c547-4395-a4d3-0d9e562c37d7}
Image Count: 1
Compression: LZX
Part Number: 1/1
Attributes:  0x8
             Relative path junction


Available Image Choices:
------------------------
<WIM>
  <TOTALBYTES>3272285556</TOTALBYTES>
  <IMAGE INDEX="1">
    <DIRCOUNT>15078</DIRCOUNT>
    <FILECOUNT>71371</FILECOUNT>
    <TOTALBYTES>12756775435</TOTALBYTES>
    <HARDLINKBYTES>4870029526</HARDLINKBYTES>
    <CREATIONTIME>
      <HIGHPART>0x01CC6772</HIGHPART>
      <LOWPART>0x7E5E349C</LOWPART>
    </CREATIONTIME>
    <LASTMODIFICATIONTIME>
      <HIGHPART>0x01CC6847</HIGHPART>
      <LOWPART>0x7D8CCFEE</LOWPART>
    </LASTMODIFICATIONTIME>
    <WINDOWS>
      <ARCH>9</ARCH>
      <PRODUCTNAME>Microsoftr Windowsr Operating System</PRODUCTNAME>
      <EDITIONID>Prerelease</EDITIONID>
      <INSTALLATIONTYPE>Client</INSTALLATIONTYPE>
      <SERVICINGDATA>
        <PKEYCONFIGVERSION>6.2.8102.0;2011-08-23T22:28:58Z</PKEYCONFIGVERSION>
      </SERVICINGDATA>
      <HAL>acpiapic</HAL>
      <PRODUCTTYPE>WinNT</PRODUCTTYPE>
      <PRODUCTSUITE>Terminal Server</PRODUCTSUITE>
      <LANGUAGES>
        <LANGUAGE>en-US</LANGUAGE>
        <DEFAULT>en-US</DEFAULT>
      </LANGUAGES>
      <VERSION>
        <MAJOR>6</MAJOR>
        <MINOR>2</MINOR>
        <BUILD>8102</BUILD>
        <SPBUILD>0</SPBUILD>
        <SPLEVEL>0</SPLEVEL>
      </VERSION>
      <SYSTEMROOT>WINDOWS</SYSTEMROOT>
    </WINDOWS>
    <NAME>Windows DEVELOPERPREVIEW</NAME>
    <DESCRIPTION>Windows DEVELOPERPREVIEW</DESCRIPTION>
    <FLAGS>PreRelease</FLAGS>
    <DISPLAYNAME>Windows Developer Preview</DISPLAYNAME>
    <DISPLAYDESCRIPTION>Windows Developer Preview</DISPLAYDESCRIPTION>
  </IMAGE>
</WIM>


 
 
imagex shows that there is only one image available (Windows Developer Preview).

I mounted the Windows 8 Developer Preview Image (index 1) to an empty directory that I created, c:\mounted_images.


imagex /mount e:\sources\install.wim 1 c:\mounted_images

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

Mounting: [e:\sources\install.wim, 1] -> [c:\mounted_images]...

[ 100% ] Mounting progress

Successfully mounted image.

Total elapsed time: 7 min 27 sec 
  
From the c:\mounted_images directory, it is apparent that this is a full base install of Windows 8 Developer Preview. Files can be copied out of the directory and the image can be unmounted.

c:\Program Files\Windows AIK\Tools\amd64>imagex /unmount c:\mounted_images\

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

Unmounting: [c:\mounted_images\]...

[ 100% ] Mount cleanup progress

Successfully unmounted image.

Total elapsed time: 55 sec
 




Have an idea for something that you'd like to see explored? Leave a comment or send an e-mail to razorbackx_at_gmailcom

3 comments:

  1. Hi, I am having issues mounting Windows Server 2008 R2. I am running Windows 7 64-bit and I obtained the windows server iso from msdn. When I enter the following command, I get an error.


    C:\Program Files\Windows AIK\Tools\PETools\amd64>imagex /mount G:\sources\install.wim 3 C:\mounted_images

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

    Mounting: [G:\sources\install.wim, 3] -> [C:\mounted_images]...
    [ 0% ] Mounting progress


    [ ERROR ] C:\mounted_images\ProgramData\Microsoft\Windows\WER\ReportQueue (Error = 1)




    Error mounting image.


    Incorrect function.


    Any help will be greatly appreciated, thanks!

    ReplyDelete
  2. Thanks for the great article! Did you just try it on Windows7 to see if it works or do you know if it is officially supported? The Microsoft page does not say it will work on win7 (http://technet.microsoft.com/en-us/library/cc722145(v=ws.10).aspx)

    ReplyDelete
    Replies
    1. All of the operating system versions above have been tried. I used the WAIK for Windows 7

      Delete