DISM Configuration List and WimScript.ini Files
Published: February 29, 2012
Updated: May 31, 2012
Applies To: Windows 8, Windows Server 2012
The Deployment Image Servicing and Management (DISM) tool is a command-line tool that you can use to capture and apply Windows images. You can create a configuration list file to determine the following:
Which files and folders must be excluded from the capture process when you use the /Capture-Image option with the DISM tool.
Which folders, files, and file types must be excluded from the compression process when you use the /Compress argument.
If you name your configuration list file wimscript.ini and store it in your DISM directory (where the DISM.exe file is located), it will automatically run when you use the /Capture-Image option (with or without the /Compress argument) without requiring you to use the /ConfigFile argument.
The /ConfigFile argument enables you to customize specific compression, capture, and boundary alignment actions for each file and folder when you capture an image using DISM.exe. You can create a configuration list (.ini) file by using a text editor, such as Notepad.
The following sections appear in the DISM configuration list file.
Enables you to define the files and folders to exclude when you use the /Capture-Image option.
Enables you to override the default exclusion list when you use the /Capture-Image option.
Enables you to define the specific files and folders, and also to specify file types, to exclude when you use the /Compress argument.
By default, the DISM.exe tool will exclude the following files.
[ExclusionList] \$ntfs.log \hiberfil.sys \pagefile.sys \swapfile.sys "\System Volume Information" \RECYCLER \Windows\CSC [CompressionExclusionList] *.mp3 *.zip *.cab \WINDOWS\inf\*.pnf
You can only use wildcard characters in the last component in a file path that does not begin with a backslash. For example:
You can use a preceding backslash to limit file-matching and directory-matching relative to the root directory. For example, you can use this exclusion list:
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
If you create a custom-named configuration file and store it outside the DISM directory, you can use the DISM command to run the file. At a command prompt, open the DISM directory. For example:
Dism /Capture-Image /ImageFile:install.wim /CaptureDir:D:\ /Name:Drive-D /ConfigFile:<configuration list>
Dism /Append-Image /ImageFile:install.wim /CaptureDir:D:\ /Name:Drive-D /ConfigFile:<configuration list>
where <configuration list> provides the complete directory location for the configuration file. For example,
c:\imaging\configuration_list.ini. You must use either the /Capture-Image option to create a new .wim file or the /Append-Image option to append an existing .wim file.