Create an ImageX Configuration File
ImageX is a command-line tool that enables the creation of image files for deployment in a manufacturing or corporate IT environment. You can create a configuration file (configuration_list.ini) to determine:
- Which files and folders must be excluded from the capture process when using the /capture option.
- Which folders, files, and file types must be excluded from the compression process when using the /compress option.
- Whether the .wim file aligns on a 64K boundary or the default 32K boundary.
If you name your configuration_list.ini file wimscript.ini and store it in your ImageX directory (where the ImageX.exe file is located), it will automatically run when using the /capture option (with or without the /compress option) without requiring you to use the /config option.
The /config option enables you to customize specific compression, capture, and boundary alignment actions, for each individual file and folder, within ImageX. Create configuration_list.ini by using a text editor, such as Notepad.
Creating a Configuration List
The following sections appear in the ImageX configuration list.
Enables you to define the files and folders to exclude from the /capture operation.
Enables you to override the default exclusion list during the /capture operation.
Enables you to define the specific files and folders, in addition to specific file types, to exclude from the /compress operation.
Enables you to define specific files to align on a 64K boundary. Compression will not occur for any files aligned on a 64K boundary. If you do not list files within this section, all your files will align on a 32K boundary.
Security may occasionally use this section for pattern-matching purposes.
Default Exclusion List
By default, ImageX will exclude the following files.
"\System Volume Information"
Exclusion List Guidelines
You can only use wildcards in the last component in a file path that does not begin with a preceding back slash. For example,
You can use a preceding backward slash to limit file- and directory-matching relative to the root directory. For example, if you capture the "c:\" drive with the previous exclusion list,
ImageX will exclude the following files and directories.
However, ImageX will not exclude files or directories contained in the following example.
You can override the default exclusion list by using the
[ExclusionException]section. For example,
[ExclusionException] \pagefile.sys "\System Volume Information"
If an explicit
[ExclusionException]section is provided in the WIM configuration file, it will always take precedence over the
You cannot override the default compression exclusion list by using the
Using the Configuration File
If you create a custom-named configuration file and store it outside of the ImageX directory, you can use ImageX to run the file. At a command prompt, open the ImageX directory. For example,
imagex /config c:\imaging\<configuration_list>.ini /capture d: d:\imaging\data.wim "Drive D"
imagex /config c:\imaging\<configuration_list>.ini /append d: d:\imaging\data.wim "Drive D"
where c:\imaging\<configuration_list>.ini provides the complete directory location for the configuration file. You must use either the /capture option to create a new .wim file or the /append option to append an existing .wim file.