ImageX Command-Line Options (Standard 7 SP1)

7/8/2014

ImageX is a command-line tool in Standard 7 that you can use to create and manage Standard 7 image (.wim) files. A .wim file contains one or more volume images, disk volumes that contain images of an installed Standard 7 operating system.

To modify your volume images, you must install the Windows Imaging File System Filter (WIM FS Filter) driver on a computer that is running Windows XP with Service Pack 2 (SP2), Windows Server 2003 with Service Pack 1 (SP1), or Standard 7. Installing the WIM FS Filter driver enables you to mount a .wim file as if it were a directory and to browse, copy, paste, and edit the volume images from a file management tool, such as Windows Explorer, without extracting or recreating the image.

Ff794852.note(en-US,WinEmbedded.60).gifNote:
You must run each of these command-line options individually. If you do not provide a location for your captured .wim file, the process automatically creates it in your ImageX directory. For example, if you enter data.wim instead of D:\Imaging\Data.wim while you are using the /capture option, the data.wim file appears in your ImageX directory.

In order to run ImageX on a computer that has Windows Embedded Standard 7 Toolkit installed, open the Windows PE Tools Command Prompt. This will load the Standard 7 environment variables and let you use ImageX from your command prompt.

Alternatively, to copy ImageX to a storage device or a remote location, you can find ImageX at the following locations, where C is the drive on which you installed Standard 7 Toolkit, and E is a DVD drive that contains the Standard 7 Toolkit installation media. Depending on your device architecture, replace <device architecture> with x86 or AMD64.

C:\Program Files\Windows Embedded Studio\Tools\<device architecture>
E:\Windows Embedded Studio\Program Files\Windows Embedded Studio\Tools\<device architecture>
Ff794852.note(en-US,WinEmbedded.60).gifNote:
If your development computer uses a 64-bit architecture, your install location will change to C:\Program Files (x86)\Windows Embedded Studio.

ImageX command-line options use the following conventions.

imagex [flags] {/append | /apply | /capture | /delete | /dir | /export | /info | /split | /mount | /mountrw | /unmount} [parameters]

The following list shows the valid syntax used for each ImageX operation type.

imagex /append image_path image_file {"description"} {/boot | /check | /config configuration_file.ini | /scroll | /verify}

imagex /apply [image_file image_number | image_name image_path] {/check | /ref | /scroll | /verify}

imagex /capture image_path image_file "name" {"description"} {/boot | /check | /compress [type] | /config | /flags | /scroll | /verify}

imagex /delete [image_file image_number | image_name] {/check}

imagex /dir [image_file image_number | image_name]

imagex /export [src_file src_number | src_name dest_file dest_name] {/boot | /check | /compress [type] | /ref [splitwim.swm]}

imagex /info img_file [img_number | img_name] [new_name] [new_desc] {/boot | /check}

imagex /mount [image_file image_number | image_name image_path] {/check}

imagex /mountrw [image_file image_number | image_name image_path] {/check}

imagex /split image_file dest_file size {/check}

imagex /unmount image_path {/commit}

Operation

Description

imagex /append image_path image_file {"description"}{/boot | /check | /config configuration_file.ini | /scroll | /verify}

Appends a volume image to an existing Standard 7 image (.wim) file. Creates a single instance of the file, comparing it against the resources that already occur in the .wim file so that you do not capture the same file two times.

Ff794852.note(en-US,WinEmbedded.60).gifNote:
You must run this option from Windows Preinstallation Environment (Windows PE) 3.0 . In addition, you must make sure that you have sufficient disk space for the /append option to run. If you run out of disk space during the /append option, you may corrupt the appended .wim file.
Ff794852.note(en-US,WinEmbedded.60).gifNote:
The .wim file can have only one assigned compression type. Therefore, you can only append files that have the same compression type.

image_path

The name and location of the existing .wim file to append.

image_file

The name and location of the volume image that appends the existing file.

"description"

The text that provides additional reference information. The straight quotation marks are required.

You can also set the following options:

/boot

Marks a volume image as bootable. This option applies only to Windows PE images. Only one volume image can be marked as bootable in a .wim file.

/check

Checks the integrity of the .wim file. If not provided, existing checks are removed.

/config configuration_file.ini

The name and location of the configuration file. You can rename this file as necessary.

/scroll

Scrolls output for redirection.

/verify

Enables file resource verification by checking for errors and file duplication.

For example,

imagex /append d: d:\imaging\data.wim "Drive D" /verify

imagex /apply [image_file image_number | image_name image_path] {/check | /ref | /scroll | /verify}

Applies a volume image to a specified drive.

Ff794852.note(en-US,WinEmbedded.60).gifNote:
You must run this option from Windows PE.

image_file

The name and location of the volume image applied to the directory.

image_number

The number that references the specific volume in the .wim file.

image_name

The name that identifies the image in the .wim file.

image_path

The file path where the image will be applied.

You must create all hard disk partitions before you start this process, unless you run this option by using a script. If you use the /apply option for a directory structure, the option includes the specified directory. This includes all subdirectories and files.

Ff794852.note(en-US,WinEmbedded.60).gifNote:
You must include the parent directory for the /apply option. Otherwise, when the image is applied, it overwrites everything in that location. For example, if you apply the image to drive C, the /apply option overwrites everything that occurs in drive C with your image files.
Ff794852.note(en-US,WinEmbedded.60).gifNote:
To automate creating a directory, you must add the mkdir target_directory command to your script before executing imagex /apply.

You can also set the following options:

/check

Checks the integrity of the .wim file. If not provided, existing checks are removed.

/ref splitwim.swm

Enables the reference of split .wim files (SWMs). splitwim.swm is the name and location of additional split files. Wildcard characters are accepted.

/scroll

Scrolls output for redirection.

/verify

Enables file resource verification by checking for errors and file duplication.

For example,

imagex /apply d:\imaging\data.wim 1 d:\New_Directory /verify

imagex /capture image_path image_file "name" {"description"} {/boot | /check | /compress [type] | /config | /flags "EditionID" | /scroll | /verify}

Captures a volume image from a drive to a new .wim file. Captured directories include all subfolders and data. You cannot capture an empty directory. A directory must contain at least one file.

Ff794852.note(en-US,WinEmbedded.60).gifNote:
ImageX does not support extended attributes. ImageX ignores extended attributes during a capture operation.

During the capture operation, fast compression is automatically applied. If you must have a different compression type, use the /compress option.

image_path

The name and location of the volume image for capture.

image_file

The name and location of the new .wim file.

"name"

The name of the new .wim file. This value is required. The straight quotation marks are required.

"description"

The text that provides additional reference information. This value is optional. The straight quotation marks are required.

You can also set the following options:

/boot

Marks a volume image as bootable. Available only for Windows PE images. Only one volume image can be marked as bootable in a .wim file.

/check

Checks the integrity of the .wim file. If not provided, existing checks are removed.

/compress [maximum | fast | none]

Specifies the type of compression used for the initial capture operation. The maximum option provides the best compression but takes the longest time to capture the image. The fast option provides faster image compression but the resulting files are larger than those compressed by using maximum. This is also the default compression type, used if you leave this parameter blank. The none option does not compress the captured image at all.

Ff794852.note(en-US,WinEmbedded.60).gifNote:
While the compression type that you choose affects the capture time, it only slightly affects the apply time.

/config configuration_file.ini

The name and location of the configuration file. You can rename this file, as necessary.

Ff794852.note(en-US,WinEmbedded.60).gifNote:
If you rename your Configuration_list.ini file to Wimscript.ini and store it in your ImageX directory,where the ImageX.exe file is located, it runs automatically when you run the /capture option, without requiring you to use the /config option.

/flags "EditionID"

Specifies the version of Standard 7 that you are about to capture. The /flags value is required if you plan to re-deploy a custom Install.wim with Image Builder. The straight quotation marks are required. This flag is not required if you deploy the image by using ImageX. Valid EditionID values include the following:

  • Standard 7

/scroll

Scrolls output for redirection.

/verify

Enables file resource verification by checking for errors and file duplication.

Ff794852.note(en-US,WinEmbedded.60).gifNote:
The /verify option affects the overall capture time. During a capture operation, the progress bar indicates the status of the capture operation only, not the verify operation. When the capture is complete, the verify process starts. This process takes time even though the progress bar shows 100 percent.

For example,

imagex /capture d: d:\imaging\data.wim "Drive D" /verify
imagex /compress fast /flags "MyImage" /check /scroll /capture c: d:\install.wim "MyImage"

imagex /delete [image_file image_number | image_name] {/check}

Deletes the specified volume image from a .wim file that has multiple volume images. This option deletes only the metadata entries and XML entries. It does not delete the stream data and does not optimize the .wim file.

As soon as the file is mounted, you can view, but not modify, all the information that is contained in the directory. If you do not specify the parameters to mount, this option lists all mounted images.

image_file

The name and location of the .wim file specified for deletion.

image_number

The number that references the specific volume in the .wim file.

Ff794852.note(en-US,WinEmbedded.60).gifNote:
You must run this option from Windows PE. There must always be at least one volume image in a .wim file so that you can delete a volume image only if more than one image exists.

image_name

The name that references the image in the .wim file.

You can also set the following option:

/check

Checks the integrity of the .wim file. If not provided, existing checks are removed.

For example,

imagex /delete d:\imaging\data.wim 1

imagex /dir [image_file image_number | image_name]

Displays a list of the files and folders in a specified volume image.

image_file

The name and location of the volume image for review. If you do not provide a volume image, this option returns a directory listing for all volume images in the .wim file.

image_number

The number that references the specific volume in the .wim file.

image_name

The name that references the image in the .wim file.

For example,

imagex /dir d:\imaging\data.wim 1

imagex /export [src_file src_number | src_name dest_file dest_name] {/boot | /check | /compress [type] | /ref [splitwim.swm]}

Exports a copy of the specified .wim file to another .wim file. The source and destination files must use the same compression type.

Ff794852.note(en-US,WinEmbedded.60).gifNote:
You must run this option from Windows PE. Additionally, you must make sure that you have sufficient disk space for the /export option to run. If you run out of disk space while the /export option runs, you might corrupt the Destination.wim file.

src_file

The file path of the .wim file that contains the image to be copied

src_number

The number that references the specific volume in the .wim file.

src_name

The name that identifies the image in the source .wim file.

dest_file

The file path of the .wim file that receives the image copy.

dest_name

The unique name for the image in the destination .wim file.

You can also set the following options:

/boot

Marks a volume image as bootable. Available only for Windows PE images. Only one volume image can be marked as bootable in a .wim file.

/check

Checks the integrity of the .wim file. If not provided, existing checks are removed.

/compress [maximum | fast | none]

Specifies the type of compression used for the initial capture operation. The maximum option provides the best compression but takes the longest time to capture the image. The fast option provides faster image compression but the resulting files are larger than those compressed by using maximum. This is also the default compression type, used if you leave this parameter blank. The none option does not compress the captured image at all.

/ref splitwim.swm

Enables the reference of split .wim files (SWMs). splitwim.swm is the name and location of additional split files. Wildcard characters are accepted.

For example,

imagex /export d:\imaging\data.wim d:\imaging\sample.wim 1

imagex / info img_file [img_number | img_name] [new_name] [new_desc] {/boot | /check}

Returns the stored XML descriptions for the specified .wim file. This includes but is not limited to the total file size, the image index number, the directory count, file count, and a description.

image_file

The name and location of the .wim file for XML data review.

image_number

The number that identifies an image in the .wim file.

image_name

The name that identifies an image in the .wim file.

new_name

The new unique name for the specified image.

new_desc

The new description for the specified image.

You can also set the following options:

/boot

Marks a volume image as bootable. Available only for Windows PE images. Only one volume image can be marked as bootable in a .wim file.

/check

Checks the integrity of the .wim file. If not provided, existing checks are removed.

For example,

imagex /info d:\imaging\data.wim

imagex /mount [image_file image_number | image_name image_path] {/check}

Mounts a .wim file from Windows XP with Service Pack 2 (SP2), Windows Server 2003 with Service Pack 1 (SP1), or Standard 7 with read-only permission to a specified directory.

As soon as the file is mounted, you may view, but not modify, all the information that is contained in the directory.

Ff794852.note(en-US,WinEmbedded.60).gifNote:
You must install the WIM FS filter before you can mount an image.

image_file

The path of the .wim file that contains the specified image.

image_number

The number that references the specific volume in the .wim file.

image_name

The name that references the image in the .wim file.

image_path

The file path where the specified image will be mounted.

You can also set the following flag:

/check

Checks the integrity of the .wim file. If not provided, existing checks are removed.

For example,

imagex /mount d:\imaging\data.wim 2 c:\mounted_images

imagex /mountrw [image_file image_number | image_name image_path] {/check}

Mounts a .wim file from Windows XP with Service Pack 2 (SP2), Windows Server 2003 with Service Pack 1 (SP1), or Standard 7 with read/write permission to a specified directory.

As soon as the file is mounted, you can view and modify all the information that is contained in the directory.

Ff794852.note(en-US,WinEmbedded.60).gifNote:
You must install the WIM FS filter before you can mount an image.

The /mountrw option requires exclusive access to the .wim file. Therefore, you cannot use the /mountrw option if an image is currently mounted by using the /mount option or the /mountrw option.

Ff794852.note(en-US,WinEmbedded.60).gifNote:
You must not mount an image to the parent or subdirectories of an already mounted directory. Upon mounting an image to a directory that contains files, the existing files will be masked until you run the /unmount option. Additionally, you must not mount your image to Standard 7 reserved folders.

image_file

The name and location of the .wim file to mount with read/write permission.

image_number

The number that references the specific volume in the .wim file.

image_name

The name that references the image in the .wim file.

image_path

The file path where the specified image will be mounted.

You can also set the following option:

/check

Checks the integrity of the .wim file. If not provided, existing checks are removed.

For example,

imagex /mountrw  d:\imaging\data.wim 2 c:\mounted_images

imagex /split image_file dest_file size {/check}

Splits an existing .wim file into multiple read-only split .wim files (.swm).

Ff794852.note(en-US,WinEmbedded.60).gifNote:
You must run this option from Windows PE.

image_file

The name and location of the .wim file to split.

dest_file

The file path of the split files.

size

The maximum size in megabytes (MB) for each created file.

This option generates the .swm files into the specified directory, naming each file the same as the specified image_file, but with an appended number and the .swm file-name extension. For example, if you choose to split a file that is named Data.wim, this option creates a Data.swm file, a Data2.swm file, a Data3.swm file, and so on, defining each part of the split .wim file.

You can also set the following option:

/check

Checks the integrity of the .wim file. If not provided, existing checks are removed.

For example,

imagex /split d:\imaging\data.wim 600

imagex /unmount image_path {/commit}

Unmounts the mounted image from a specified directory.

Ff794852.note(en-US,WinEmbedded.60).gifNote:
Confirm that you have sufficient hard disk space to add the files for your image. You must account for the size of the files that you add to the .wim file, plus any increase in file size because of the modification of existing files, minus any files that you deleted, before you perform the /commit option. If you have insufficient hard disk space, an error occurs.

image_path

The complete directory location to unmount the files. If you do not specify a directory, this option lists all mounted images.

Ff794852.note(en-US,WinEmbedded.60).gifNote:
If you use the /unmount option without the /commit option, your changes are discarded. To be able to save your changes, you must mount the image by using the /mountrw option and use the /commit option when unmounting the image.

For example,

imagex /unmount /commit c:\mounted_images
Show: