次の方法で共有


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.

Section Description

[ExclusionList]

Enables you to define the files and folders to exclude from the /capture operation.

[ExclusionException]

Enables you to override the default exclusion list during the /capture operation.

[CompressionExclusionList]

Enables you to define the specific files and folders, in addition to specific file types, to exclude from the /compress operation.

Note
You can use file or folder matching to exclude a file from compression. You can provide a full path match, or you can use wildcards (*). For example, you can use C:\WINDOWS\inf\*.pnf to match a specific type of file or C:\WINDOWS\inf\* to match an entire folder.

[AlignmentList]

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.

Note

Security may occasionally use this section for pattern-matching purposes.

Default Exclusion List

By default, ImageX will exclude the following files.

[ExclusionList]
\$ntfs.log
\hiberfil.sys
\pagefile.sys
"\System Volume Information"
\RECYCLER
\Windows\CSC

[CompressionExclusionList]
*.mp3
*.zip
*.cab
\WINDOWS\inf\*.pnf

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,

    myfolder\*.txt
    
  • 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,

    \myfolder
    \folder\subfolder
    

    ImageX will exclude the following files and directories.

    c:\myfolder
    c:\folder\subfolder
    

    However, ImageX will not exclude files or directories contained in the following example.

    c:\main\myfolder
    c:\data\folder\subfolder
    
  • 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 [Exclusion List] section.

  • You cannot override the default compression exclusion list by using the [ExclusionException] section.

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"

-OR-

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.

See Also

Concepts

ImageX Command-Line Options