Skip to content
Homes32 edited this page May 14, 2022 · 1 revision

DISM

Execute DISM with the provided arguments.

This command is a wrapper for dism.exe and passes any arguments directly to the executable.

This command is provided as compatibility shim to allow using DISM on Win10 images from a Win7 Host.

Syntax

DISM,<Args>[,<WorkDir>]

Arguments

Argument Description
Args The arguments to pass to the DISM executable.
WorkDir The full path to the working directory. Default is the exe path.

Return Codes

Variable Description
#r ExitCode provided by the DISM application.

Remarks

Make sure to escape double-quotes, percent, etc. in Args.

See the DISM documentation or DISM /? for more details on dism.exe arguments.

The version of DISM provided with Win7 does not recognize Win10 imagines when using the /image: argument. In order to work around this limitation and allow DISM operations (Localization, driver integration, etc) on Win7 we use DISM from Win10 AIK tools, downloaded using JFX's GetWaikTools.exe during Pre-Flight Check.

* Win10+ - Executes DISM.exe from the HostOS
* Win7/8 - Executes Win10 AIK DISM.exe

Eventually GetWaikTools will no longer be able to download an AIK that works on Win7, at which time it will no longer be possible to build PhoenixPE on Win7. What do you expect running an unsupported OS? ;-)

Related

Examples

Example 1


Echo,"Run DISM..."
DISM,"/image:#$q%MountDir%#$q /Disable-Feature /FeatureName:NetFx3 /LogPath:#$q%DismLog%#$q"
If,Not,#r,Equal,0,Halt,"Error: Failed to extract [WinPE.zip]."