Windows 7 / Getting Started

Applying an Image Using ImageX

You can use your bootable media with ImageX to apply a captured image to a stand-alone system. The image can be stored and applied from several different locations, including the following:

A USB Flash Drive: This includes the USB flash drive used to boot to WinPE. If the USB flash drive is large enough, this is the easiest method.

A Removable USB Hard Drive: On some systems, you may need to attach the hard drive after booting into WinPE, and on other systems, you may need to attach it before booting into WinPE.

A Drive on the Existing System: If the system has a preexisting operating system, you can copy the image file onto the system while booted into the operating system. The only drawback is ensuring that you have enough hard drive space to accept the image file and install Windows 7.

You use the Imagex /Apply command to apply an image. The /Apply command includes the following options:

  • image_file This is the full path and filename of the WIM file containing the volume image.
  • image_number This is the index number that identifies the image within the WIM file. You can use the Imagex /info command to identify the index number if your WIM file includes more than one image. If there is only one image in the file, it has an index number of 1.
  • image_name Instead of the number, you can use the image name. If the name contains any spaces, it must be enclosed in quotes. The ImageX /info command also identifies the image name.
  • image_path The path where the image will be applied. This is normally the C: drive but can be another partition for a dual-boot system.

The basic syntax with these options is as follows:

Imagex /apply image_file image_number or image_name imagepath

For example, if you have an image file named Win7.wim with a single image located in the D:\ Images path and you want to apply the image to the C: drive, you can use the following command:

Imagex /apply D:\images\win7.wim 1 c:

The following steps show how to apply an image using ImageX:

  1. Boot using the WinPE media you created. When the WinPE boots, it will run the wpeinit program and eventually you'll see a command prompt in the X:\Windows\System32 folder after wpeinit completes. As a reminder, X: is the actual assigned drive and it represents a RAM disk created by the WinPE.
  2. Identify the drive letter of your bootable media. You can do this by entering the Dir command followed by a letter like this:
    Dir C:
    Dir D:
    Dir E:
    
  3. Once you identify the drive, change to the drive by entering the letter and a colon. For example, on our system, the bootable media was the H: drive, so we entered this command:
    H:
  4. Enter the following ImageX command to apply the image:
    Imagex /apply H:\images\win7.wim 1 c:
  5. If your image is located somewhere else, you'll need to modify the path to the image instead of using h:\images\win7.wim. Additionally, if you have an image file with multiple images, you may need to use a different index number than the number 1, depending on which image you want to apply.

The display will show steady progress in the following format:

[ 26% ] Applying progress: 3:24 mins remaining

When the process completes, you can reboot the system and it will boot into the Windows 7 Welcome phase.

Viewing the Contents of an Image:
If you want to view the contents of an image, you can use the imagex /dir command by specifying the path to the image and the image number, or image name. The output is extensive, so you may want to redirect it to a text file. You can issue the following command from the Deployment Tools command prompt to create a text file listing all the files and folders from the first image in the C:\images\win7.wim file:

Imagex /dir c:\images\win7.wim 1 > c:\images\win7.txt
[Previous] [Contents] [Next]