ImageX is an imaging tool built from a set of APIs, known as Imaging APIs for Windows. The primary purpose of ImageX is to capture, modify, and apply p_w_picpaths for deployment in a manufacturing or corporate IT environment. ImageX supports the new Microsoft Windows Imaging (.wim) format.

ImageX Architecture

ImageX relies on several components, including the ImageX executable (ImageX.exe), the WIM File System Filter (Wimfltr.sys and Wimfltr.inf), the WIM API set, and the .wim file format. The following diagram shows the interaction between these components.
ImageX Command-Line Options_ImageX
 
To modify your volume p_w_picpaths, you must install the Windows Imaging File System Filter (WIM FS Filter) driver on a computer running Windows XP with Service Pack 2 (SP2), Windows Server 2003 with Service Pack 1 (SP1), or Windows Vista. Installing the WIM FS Filter driver enables you to mount a .wim file as if it were a directory and to browse, to copy, to paste, and to edit the volume p_w_picpaths from a file management tool, such as Windows Explorer, without extracting or recreating the p_w_picpath.
ImageX Command-Line Options_休闲_02Important
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 using the /capture option, the Data.wim file appears in your ImageX directory.

ImageX Command-Line Options

ImageX command-line options use the following conventions.
p_w_picpathx [flags] {/append | /apply | /capture | /delete | /dir | /export | /info | /split | /mount | /mountrw | /unmount} [parameters]
The following list shows the valid syntax used for each p_w_picpathx operation type.
p_w_picpathx /append p_w_picpath_path p_w_picpath_file {"description"} {/boot | /check | /config configuration_file.ini | /scroll | /verify}
p_w_picpathx /apply p_w_picpath_file p_w_picpath_number p_w_picpath_name p_w_picpath_path {/check | /ref | /scroll | /verify}
p_w_picpathx /capture p_w_picpath_path p_w_picpath_file "name" {"description"} {/boot | /check | /compress [type] | /config | /flags "EditionID" | /norpfix | /scroll | /verify}
p_w_picpathx /delete p_w_picpath_file p_w_picpath_number p_w_picpath_name {/check}
p_w_picpathx /dir p_w_picpath_file p_w_picpath_number p_w_picpath_name
p_w_picpathx /export src_file src_number src_name dest_file dest_name {/boot | /check | /compress [type] | /ref [splitwim.swm]}
p_w_picpathx /info img_file [img_number | img_name] [new_name] [new_desc] {/boot | /check}
p_w_picpathx /mount p_w_picpath_file p_w_picpath_number p_w_picpath_name p_w_picpath_path {/check}
p_w_picpathx /mountrw p_w_picpath_file p_w_picpath_number p_w_picpath_name p_w_picpath_path {/check}
p_w_picpathx /split p_w_picpath_file dest_file size {/check}
p_w_picpathx /unmount p_w_picpath_path {/commit}
Operation
Description
p_w_picpathx /append p_w_picpath_path p_w_picpath_file {"description"}{/boot | /check | /config configuration_file.ini | /scroll | /verify}
Appends a volume p_w_picpath to an existing Windows p_w_picpath (.wim) file. Creates a single instance of the file, comparing it against the resources that already exist in the .wim file, so you do not capture the same file twice.
ImageX Command-Line Options_休闲_02Important
You must run this option from the Windows Preinstallation Environment (Windows PE). In addition, you must ensure that you have enough disk space for the /append option to run. If you run out of disk space during the /append option, you might corrupt the appended .wim file.
ImageX Command-Line Options_休闲_02Important
The .wim file can have only one assigned compression type; therefore, you can append only files with the same compression type.
p_w_picpath_path
Specifies the name and the location of the existing .wim file to append.
p_w_picpath_file
Specifies the name and the location of the volume p_w_picpath that appends the existing file.
"description"
Specifies the text that provides additional reference information. The straight quotation marks are required.
You can also set the following options:
/boot
Marks a volume p_w_picpath as bootable. This option applies only to Windows PE p_w_picpaths. Only one volume p_w_picpath 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
Specifies the name and the 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,
p_w_picpathx /append d: d:\imaging\data.wim "Drive D" /verify
p_w_picpathx /apply p_w_picpath_file p_w_picpath_numberp_w_picpath_namep_w_picpath_path {/check | /ref | /scroll | /verify}
Applies a volume p_w_picpath to a specified drive.
ImageX Command-Line Options_休闲_02Important
You must run this option from Windows PE.
p_w_picpath_file
Specifies the name and the location of the volume p_w_picpath applied to the directory.
p_w_picpath_number
Specifies the number that references the specific volume within the .wim file.
p_w_picpath_name
Specifies the name that identifies the p_w_picpath in the .wim file.
p_w_picpath_path
Specifies the file path where the p_w_picpath will be applied.
You must create all hard disk partitions before beginning this process, unless you run this option by using a script. If you use the /apply option for a directory structure, the option will include the specified directory, including all subdirectories and files.
ImageX Command-Line Options_休闲_02Important
You must include the parent directory for the /apply option. Otherwise, when the p_w_picpath is applied, it will overwrite everything in that location. For example, if you apply the p_w_picpath to drive C, the /apply option overwrites everything that exists in drive C with your p_w_picpath files. To automate the creation of a directory, you must add the mkdir target_directory command to your script before executing p_w_picpathx /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. Wildcards are accepted.
/scroll
Scrolls output for redirection.
/verify
Enables file resource verification by checking for errors and file duplication.
For example,
p_w_picpathx /apply d:\imaging\data.wim 1 d:\New_Directory /verify
p_w_picpathx /capture p_w_picpath_path p_w_picpath_file "name" {"description"} {/boot | /check | /compress [type] | /config | /flags "EditionID" | /norpfix | /scroll | /verify}
Captures a volume p_w_picpath 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.
ImageX Command-Line Options_职场_07Note
ImageX does not support extended attributes. ImageX will ignore extended attributes during a capture operation.
During the capture operation, fast compression is automatically applied. If you require a different compression type, use the /compress option.
p_w_picpath_path
Specifies the name and the location of the volume p_w_picpath for capture.
p_w_picpath_file
Specifies the name and the location of the new .wim file.
"name"
Specifies the name of the new .wim file. This value is required. The straight quotation marks are required.
"description"
Specifies 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 p_w_picpath as bootable. Available only for Windows PE p_w_picpaths. Only one volume p_w_picpath can be marked as bootable within 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 p_w_picpath. The fast option provides faster p_w_picpath compression but the resulting files are larger than those compressed with the maximum option. This is also the default compression type, used if you leave this parameter blank. The none option does not compress the captured p_w_picpath at all.
ImageX Command-Line Options_职场_07Note
While the compression type that you choose affects the capture time, it only slightly affects the apply time.
/config configuration_file.ini
Specifies the name and the location of the configuration file. You can rename this file, as necessary.
ImageX Command-Line Options_职场_07Note
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 will automatically run when you run the /capture option, without requiring you to use the /config option.
/flags "EditionID"
Specifies the version of Windows you are about to capture. The /flags value is required if you are going to re-deploy a custom Install.wim with Windows Setup. The straight quotation marks are required. This flag is not required if you deploy the p_w_picpath, by using ImageX. Valid EditionID values include:
HomeBasic
HomePremium
Starter
Ultimate
Business
Enterprise
ServerDatacenter
ServerEnterprise
ServerStandard
/norpfix
Disables reparse point tag fixup. If set, reparse points that resolve to paths outside of p_w_picpath_path will not be captured.
/scroll
Scrolls output for redirection.
/verify
Enables file resource verification, by checking for errors and file duplication.
ImageX Command-Line Options_职场_07Note
The /verify option will affect 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 begins. This process takes time even though the progress bar shows 100 percent.
For example,
p_w_picpathx /capture d: d:\imaging\data.wim "Drive D" /verify
p_w_picpathx /compress fast /flags "Ultimate" /check /scroll /capture c: d:\install.wim "Windows Vista Ultimate"
p_w_picpathx /delete p_w_picpath_filep_w_picpath_numberp_w_picpath_name {/check}
Deletes the specified volume p_w_picpath from a .wim file with multiple volume p_w_picpaths. This option deletes only the metadata entries and XML entries. It does not delete the stream data and does not optimize the .wim file.
Once the file is mounted, you can view, but not modify, all the information contained in the directory. If you do not specify the parameters to mount, this option will list all mounted p_w_picpaths.
p_w_picpath_file
Specifies the name and the location of the .wim file specified for deletion.
p_w_picpath_number
Specifies the number that references the specific volume within the .wim file.
ImageX Command-Line Options_休闲_02Important
You must run this option from Windows PE. There must always be at least one volume p_w_picpath in a .wim file, so you can delete a volume p_w_picpath only if more than one p_w_picpath exists.
p_w_picpath_name
Specifies the name that references the p_w_picpath 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,
p_w_picpathx /delete d:\imaging\data.wim 1
p_w_picpathx /dir p_w_picpath_filep_w_picpath_numberp_w_picpath_name
Displays a list of the files and folders within a specified volume p_w_picpath.
p_w_picpath_file
Specifies the name and the location of the volume p_w_picpath for review. If you do not provide a volume p_w_picpath, this option returns a directory listing for all volume p_w_picpaths in the .wim file.
p_w_picpath_number
Specifies the number that references the specific volume within the .wim file.
p_w_picpath_name
Specifies the name that references the p_w_picpath in the .wim file.
For example,
p_w_picpathx /dir d:\imaging\data.wim 1
p_w_picpathx /export src_filesrc_numbersrc_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. You can also optimize an p_w_picpath by exporting to a new p_w_picpath file. When you modify an p_w_picpath, ImageX stores additional resource files that increase the overall size of the p_w_picpath. Exporting the p_w_picpath will remove unnecessary resource files.
ImageX Command-Line Options_休闲_02Important
You must run this option from Windows PE. Additionally, you must ensure that you have enough 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
Specifies the file path of the .wim file that contains the p_w_picpath to be copied
src_number
Specifies the number that references the specific volume within the .wim file.
src_name
Specifies the name that identifies the p_w_picpath in the source .wim file.
dest_file
Specifies the file path of the .wim file that will receive the p_w_picpath copy.
dest_name
Specifies the unique name for the p_w_picpath in the destination .wim file.
You can also set the following options:
/boot
Marks a volume p_w_picpath as bootable. Available only for Windows PE p_w_picpaths. Only one volume p_w_picpath can be marked as bootable within 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 p_w_picpath. The fast option provides faster p_w_picpath compression but the resulting files are larger than those compressed with the maximum option. This is also the default compression type, used if you leave this parameter blank. The none option does not compress the captured p_w_picpath at all.
/ref splitwim.swm
Enables the reference of split .wim files (SWMs). splitwim.swm is the name and location of additional split files. Wildcards are accepted.
For example,
p_w_picpathx /export d:\imaging\data.wim d:\imaging\sample.wim 1
p_w_picpathx /info img_file[img_number | img_name] [new_name] [new_desc] {/boot | /check}
Returns the stored XML descriptions for the specified .wim file, including but not limited to the total file size, the p_w_picpath index number, the directory count, file count, and a description.
p_w_picpath_file
Specifies the name and the location of the .wim file for XML data review.
p_w_picpath_number
Specifies the number that identifies an p_w_picpath in the .wim file.
p_w_picpath_name
Specifies the name that identifies an p_w_picpath in the .wim file.
new_name
Specifies the new unique name for the specified p_w_picpath.
new_desc
Specifies the new description for the specified p_w_picpath.
You can also set the following options:
/boot
Marks a volume p_w_picpath as bootable. Available only for Windows PE p_w_picpaths. Only one volume p_w_picpath can be marked as bootable within a .wim file.
/check
Checks the integrity of the .wim file. If not provided, existing checks are removed.
For example,
p_w_picpathx /info d:\imaging\data.wim
p_w_picpathx /mount p_w_picpath_filep_w_picpath_numberp_w_picpath_namep_w_picpath_path {/check}
Mounts a .wim file from Windows XP with Service Pack 2 (SP2), Windows Server 2003 with Service Pack 1 (SP1), or Windows Vista with read-only permission to a specified directory.
Once the file is mounted, you may view, but not modify, all the information contained in the directory.
ImageX Command-Line Options_休闲_02Important
You must install the WIM FS filter before you can mount an p_w_picpath.
p_w_picpath_file
Specifies the path of the .wim file containing the specified p_w_picpath.
p_w_picpath_number
Specifies the number that references the specific volume within the .wim file.
p_w_picpath_name
Specifies the name that references the p_w_picpath in the .wim file.
p_w_picpath_path
Specifies the file path where the specified p_w_picpath 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,
p_w_picpathx /mount d:\imaging\data.wim 2 c:\mounted_p_w_picpaths
p_w_picpathx /mountrw p_w_picpath_filep_w_picpath_numberp_w_picpath_namep_w_picpath_path {/check}
Mounts a .wim file from Windows XP with Service Pack 2 (SP2), Windows Server 2003 with Service Pack 1 (SP1), or Windows Vista with read/write permission to a specified directory.
Once the file is mounted, you can view and modify all the information contained in the directory.
ImageX Command-Line Options_休闲_02Important
You must install the WIM FS filter before you can mount an p_w_picpath.
The /mountrw option requires exclusive access to the .wim file; therefore, you cannot use the /mountrw option if an p_w_picpath is currently mounted using the /mount option or the /mountrw option.
ImageX Command-Line Options_休闲_02Important
You must not mount an p_w_picpath to the parent or the subdirectories of an already-mounted directory. Upon mounting an p_w_picpath to a directory that contains files, the existing files will be masked until you run the /unmount option. Additionally, you must not mount your p_w_picpath to Windows reserved folders.
p_w_picpath_file
Specifies the name and location of the .wim file to mount with read/write permission.
p_w_picpath_number
Specifies the number that references the specific volume within the .wim file.
p_w_picpath_name
Specifies the name that references the p_w_picpath in the .wim file.
p_w_picpath_path
Specifies the file path where the specified p_w_picpath 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,
p_w_picpathx /mountrw  d:\imaging\data.wim 2 c:\mounted_p_w_picpaths
p_w_picpathx /split p_w_picpath_filedest_filesize {/check}
Splits an existing .wim file into multiple read-only split .wim files (.swm).
ImageX Command-Line Options_休闲_02Important
You must run this option from Windows PE.
p_w_picpath_file
Specifies the name and location of the .wim file to split.
dest_file
Specifies the file path of the split files.
size
Specifies 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 p_w_picpath_file, but with an appended number and the .swm file-name extension. For example, if you choose to split a file named Data.wim, this option creates a Data.swm file, a Data2.swm file, a Data3.swm file, and so on, defining each portion 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,
p_w_picpathx /split d:\imaging\data.wim 600
p_w_picpathx /unmount p_w_picpath_path {/commit}
Unmounts the mounted p_w_picpath from a specified directory.
ImageX Command-Line Options_休闲_02Important
Confirm that you have enough hard disk space to add the files for your p_w_picpath. You must account for the size of the files that you add to the .wim file, plus any increase in file size due to the modification of existing files, minus any files that you deleted, before performing the /commit option. If you do not have enough hard disk space, an error will occur.
p_w_picpath_path
Specifies the complete directory location to unmount the files. If you do not specify a directory, this option will list all mounted p_w_picpaths.
ImageX Command-Line Options_休闲_02Important
If you use the /unmount option without the /commit option, your changes will be discarded. To be able to save your changes, you must mount the p_w_picpath by using the /mountrw option and use the /commit option when unmounting the p_w_picpath.
For example,
p_w_picpathx /unmount /commit c:\mounted_p_w_picpaths

/verify and /check Options

The /verify and /check options provide file verification and data integrity support for .wim files.
The /verify option verifies cache writes and checks for errors and file duplication. The /verify option does not support disk-flushing, write-through, or bypass system-caching. During a capture operation, the /verify option reads the captured file back and compares it, byte by byte, with the original captured file. During an apply operation, the /verify option re-hashes the applied file and compares it with the hash generated during a capture operation.
The /check option is designed to detect corruption of a .wim file. If the /check option is not set during a capture operation, the flag is ignored during an apply operation. During a capture operation, the /check option generates and stores a series of hashes for every 10-megabyte (MB) data block of the .wim file. During an apply operation, the /check option hashes and verifies the 10-MB blocks against the hashes stored during the capture operation.
The /verify and /check option will affect performance during apply operations. It is recommended that you use both the /verify and /check options for optimal p_w_picpath validation and data integrity.

ImageX Error Codes

Error Code
Description
0
Successful
1
Invalid command-line option
2
WIMGAPI failure
3
Invalid configuration script
4
Access denied, requires administrator privileges
  • 收藏
  • 评论
  • 举报
提问和评论都可以,用心的回复会被更多人看到 评论
发布评论
相关文章