Deployment Image Servicing and Management Command-Line Options (Standard 7 SP1)
7/8/2014
Deployment Image Servicing and Management (DISM) installs, uninstalls, configures, and updates the features and packages in offline Windows Embedded Standard 7 images and offline Windows Preinstallation Environment (Windows PE) 3.0 images. The commands and options that are available for servicing an image depend on whether the image is offline or online. All commands work on an offline Standard 7 image. Subsets of the commands are available for servicing a running operating system.
The DISM command-line options are global and can be used with most servicing command-line options. The servicing command-line options work individually and cannot be used in combination with other servicing command-line options. A Standard 7 image is made available for servicing by mounting the image or specifying a running operating system.
Deployment Image Servicing and Management Command-Line Options
Before you can service an offline Standard 7 image, you must first mount the image. You can use Windows Image (WIM) commands and arguments to mount a WIM image for servicing and management. You can also use these commands to list the indexes or verify the architecture for the image you are mounting. After you update the image, you must unmount it and either commit or discard the changes you made.
The following commands can be used to mount, unmount, and query WIM files. These options are not case sensitive.
Operation |
Description |
---|---|
/Mount-Wim/WimFile:<path_to_image.wim> {/Index:<image_index>| /Name:<image_name>} /MountDir:<path_to_mount_directory> [/ReadOnly ] |
Mounts the WIM file to the specified directory so it is ready for servicing. /WimFile:<path_to_image.wim> Specifies the path to the WIM you want to mount. /Index:<image_index> Specifies the index of the image within the WIM you want to mount. /Name:<image_name> Specifies the name of the image within the WIM you want to mount. /MountDir:<path_to_mount_directory Specifies the path to assign to the mounted image. /ReadOnly Sets the mounted image with read-only permissions (optional). |
/Commit-Wim/MountDir:<path_to_mount_directory> |
Applies the changes you made to the mounted image. The image remains mounted until the /Unmount-Wim option is used. /MountDir:<path_to_mount_directory Specifies the path to assign to the mounted image. |
/Unmount-Wim/MountDir:<path_to_mount_directory> {/Commit | /Discard} |
Unmounts the WIM file and either commits or discards the changes that were made while the image was mounted. /MountDir:<path_to_mount_directory Specifies the path to assign to the mounted image. /Commit Commits the changes made while the image was mounted. /Discard Discards the changes made while the image was mounted. |
/Remount-Wim/MountDir:<path_to_mount_directory> |
Remounts a mounted WIM file that has become inaccessible and makes it accessible for servicing. /MountDir:<path_to_mount_directory Specifies the path to assign to the mounted image. |
/Cleanup-Wim |
Deletes all of the resources associated with a mounted WIM image that has been abandoned. This command will not unmount mounted images, nor will it delete images that can be remounted. |
/Get-WimInfo/WimFile:<path_to_image_wim> {/Index:<Image_index> | /Name:<Image_name>} |
Displays information about the images within the WIM file. When used with the /Index or /Name option, information about that image is displayed. /WimFile:<path_to_image.wim> Specifies the path to the WIM you want to mount. /Index:<image_index> Specifies the index of the image within the WIM you want to mount. /Name:<image_name> Specifies the name of the image within the WIM you want to mount. |
/Get_MountedWimInfo |
Lists the images that are currently mounted and any information about the mounted images, such as read/write permissions, mount locations, mounted file paths, and mounted image indexes. |
The base syntax is similar for nearly all DISM commands. After you have mounted or applied your Standard 7 image so that it is available offline as a flat file structure, you can specify any DISM option, the servicing command that will update your image, and the location of the offline image. You can use only one servicing command per command line. If you are servicing a computer that is running, you can use the /Online option instead of specifying the location of the offline Standard 7 image.
The base syntax for DISM is as follows:
DISM {/Image:<path_to_offline_image_directory> | /Online} [dism_options] {servicing_command} [<servicing_argument>]
The following DISM options are available for an offline image:
Dism.exe /Image:<path_to_offline_image_directory> [/WinDir:<path_to_%WINDIR%>] [/LogPath:<path_to_log_file.log>] [/LogLevel:<n>] [/SysDriveDir:<path_to_bootMgr_file>] [/Quiet] [/NoRestart] [/ScratchDir:<path_to_scratch_directory>]
The following DISM options are available for a running operating system:
Dism.exe /Online [/LogPath:<path_to_log_file>] [/LogLevel:<n>] [/Quiet] [/NoRestart] [/ScratchDir:<path_to_scratch_directory>]
Option |
Description |
---|---|
/Get-Help [ {/Image:<path_to_offline_image_directory> | /Online | /<command-line_option>} ] /? {/Image:<path_to_offline_image_directory> | /Online | /<command-line_option>} ] |
Displays information about available DISM command-line options and arguments. The options available for servicing an image depend on the servicing technology available in your image. Specifying an image, either offline or online, will generate information about the specific options that are available for that image. You can also display additional help by specifying a command-line option. |
/Log-Path:<path_to_log_file.log> |
Specifies the full path and file name to log to. If not set, the default is %WINDIR%\Logs\Dism\dism.log.
Note:
In Windows PE, the default directory is the RAMDISK scratch space, which can be as low as 23 MB.
The log file is automatically archived. The archived log file is saved with .bak appended to the file name, and a new log file is generated. Each time the log file is archived, the .bak file will be overwritten. When using a network share that is not joined to a domain, use the net use command with domain credentials to set access permissions before you set the log path for the DISM log. |
/LogLevel:<n> |
Specifies the maximum output level shown in the logs. The default log level is 3. The following values are accepted: 1 = Errors only 2 = Errors and warnings 3 = Errors, warnings, and informational output 4 = All of the previously mentioned values, plus debug output |
/Image:<path_to_offline_image_directory> |
This is the full path to the root directory of the offline Standard 7 image that you will service. If the directory named Windows is not a subdirectory of the root directory, /WinDir must be specified. This option cannot be used with /Online. |
/WinDir:<path_to_%WINDIR%> |
Used with the /Image option to specify the path to the Standard 7 directory relative to the image path. This cannot be the full path to the Windows directory; it should be a relative path. If not specified, the default is the Windows directory in the root of the offline image directory. This option cannot be used with the /Online option. |
/Online |
Specifies that the action is to be taken on the operating system that is currently running. This option cannot be used with the /Image or the /WinDir options. When /Online is used, the Windows directory for the online image is automatically detected. |
/SysDriverDir:<path_to_sysdrive_directory> |
Specifies the path to the location of the BootMgr files. This is necessary only when the BootMgr files are located on a partition other than the one containing the Windows directory and when the BootMgr files need to be serviced. This option is not necessary if you are servicing an applied image, because system partitions are not part of the WIM file. |
/Quiet |
Turns off informational and progress output to the console. Only error messages will be displayed. To run in quiet mode, this option must be set every time that the command-line utility is run. It must be present before the servicing command.
Note:
Do not use the /Quiet option with the /Get commands. No information will be displayed.
|
/NoRestart |
Suppresses restarting. If a restart is not necessary, then this command does nothing. This option will keep the application from prompting for a restart (or keep it from restarting automatically if the /Quiet option is used). |
/ScratchDir:<path_to_scratchdirectory> |
Specifies a temporary directory to be used when extracting files for temporary use during servicing. The directory must exist locally. If not specified, the \Windows\%Temp% directory will be used, with a subdirectory name created from a randomly generated hexidecimal value for each run of DISM. Items in the scratch directory are deleted after each operation. You should not use a network share location as a scratch directory to expand a package (.cab or .msu file) for installation. The directory used for extracting files for temporary use during servicing should be a local directory. |
/English |
Displays the command-line output in English.
Note:
Some resources cannot be displayed in English.
This option is not supported when using the DISM /? command. |
Servicing Command-Line Options
Depending on the image you have specified and whether the image is offline or on a running operating system, servicing commands and arguments might be available for the following types of updates:
- Windows Preinstallation Environment (Windows PE) 3.0-specific servicing commands for preparing a Windows PE image. For more information, see Windows PE Servicing Command-Line Options.
- Driver-specific servicing commands for adding, removing, and enumerating driver .inf files. For more information, see Driver Servicing Command-Line Options.
- Package-servicing commands for adding, removing, and enumerating packages and features. For more information see Operating System Package Servicing Command-Line Options.
- International-servicing commands for adjusting international settings and configurations. For more information, see International Servicing Command-Line Options.
- Servicing commands that can be used to apply an Unattend.xml answer file. For more information, see Unattended Servicing Command-Line Options.
See Also
Concepts
What Is Deployment Image Servicing and Management?
How Deployment Image Servicing and Management Works
Other Resources
Deployment Image Servicing and Management Technical Reference