Capture an Image

ImageX is a command-line tool that enables the creation of Windows Image (.wim) files for deployment in a manufacturing or corporate IT environment. By using the imagex /capture command, you can capture a volume or partition to a .wim file. Once you capture your image, you can modify and apply the image either to a network or individual destination computers.

You can compress and capture your image file from Windows PE, Windows Vista, Windows XP with Service Pack 2 (SP2), Windows Server 2003 with Service Pack 1 (SP1), or a customized Windows PE provided by Microsoft Systems Management Server (SMS) Operating System Deployment Feature Pack or Windows Deployment Services (Windows DS).


To control the amount of compression used on your image, use the /compress option.

If you compress and capture an entire installation, the best practice is to boot from Windows PE. Because Windows PE runs in memory or from a CD/DVD, it ensures that no locked files or folders will be included in your installation image. Locked files and folders will cause the image compression and capture to fail.

Compressing an Image

During the compression process, you can select one of the following compression types for your image:

  • maximum
    This type provides the best compression. However, it also takes the most time to capture the image.
  • fast
    This type provides faster image capture. However, it provides less compression than that provided by maximum. This is the default compression type, and is used if you leave this option blank or if you use the /capture option without the /compress option.
  • none
    This type captures the image without compression.

Because the /compress option specifies the type of compression for your entire .wim file, this option is valid only on the initial capture and cannot be changed. Additionally, if you use the /export option, the source and destination .wim files must have the same compression type.


If you do not provide a location for your new .wim file, it will appear in your ImageX directory. For example, if you enter Data.wim instead of d:\imaging\data.wim, then the new .wim file will appear in your ImageX directory.


Before you can capture an image by using ImageX, you must perform the following tasks:

  1. Install Windows OPK tools or Windows AIK tools on your technician computer. See Building a Technician Computer.
  2. Create a configuration file to control the capture, compression, and boundary alignment capabilities of ImageX. To create a configuration file, see the topic Create an ImageX Configuration File.

To capture an image

  1. On your technician computer, at a command prompt, open the ImageX directory. For example,

    c:\Program Files\<version>\Tools\<arch>

    Where <version> can be Windows OPK or Windows AIK and <arch> can be x86, amd64, or ia64.

  2. Compress and capture the image. For example,

    imagex /compress <type> /capture c:\image_directory d:\imaging\data.wim "new_image_file"

    Where <type> can be maximum, fast, or none; c:\image_directory is the location of the files to image; d:\imaging\data.wim is the name and location of the new image file, and "new_image_file" (with straight quotation marks) is a description of the image file.
    Optionally, you can set the following additional flags: /boot, /check, /config, /scroll, and /verify. For more information about these flags, see ImageX Command-Line Options.


If you do not provide a location for your new .wim file, the capture process automatically creates it in your ImageX directory. For example, if you enter Data.wim instead of D:\Imaging\Data.wim, then the new .wim file appears in your ImageX directory. You cannot capture an empty directory. A directory must contain at least one file. ImageX does not support extended attributes. ImageX will ignore extended attributes during a capture operation.

Next Steps

After capturing and compressing your image, you can use the /mount option or the /mountrw option to mount the image to your technician computer for modification, including adding, editing, and deleting files. If modifications are not required, you can also use the /apply option to apply the image to a network location or directly to your destination computers.


You cannot modify a split .wim file; you can only apply the file to your destination computers by using the /apply option.

See Also


ImageX Command-Line Options
Work with ImageX and Windows Images