Skip to main content

Wix.exe command-line reference

The Wix.exe .NET tool provides a reassuringly old-fashioned command-line interface to WiX. Like the dotnet command-line tool that inspired it, Wix.exe has a number of command, some with subcommands, and both required and optional switches.

Wix.exe commands

Wix.exe offers the following commands:

Wix.exe commandDescription
wix buildBuild a wixlib, package, or bundle.
wix msiSpecialized operations for manipulating Windows Installer packages.
wix burnSpecialized operations for manipulating Burn-based bundles.
wix extensionManage WiX extension cache.
wix convertConvert v3 source code to v4 source code.
wix formatEnsure consistent formatting of source code.

Wix.exe has the following switches that are common to all commands:

OptionDescription
--help or -hShow command line help.
--versionDisplay WiX Toolset version in use.
--nologoSuppress displaying the logo information.

wix build command

Build a package, bundle, or library.

wix build [options] source_file.wxs [source_file.wxs ...]
OptionDescription
-arch archArchitecture of the package or bundle. Valid values are: x86, x64, arm64. Default: x86. Equivalent MSBuild property: InstallerPlatform
-bindfiles or -bfBind files into an output .wixlib. Ignored if not building a .wixlib.
-bindpath or -b pathBind path to search for content files.
-bindpath:target or -bt pathBind path to search for target package's content files. Only used when building a patch.
-bindpath:update or -bu pathBind path to search for update package's content files. Only used when building a patch.
-bindvariable or -bv name=valueSets a bind-time variable.
-cabcache or -cc pathSet a folder to cache cabinets across builds.
-culture cultureAdds a culture to filter localization files.
-define or -d name=valueSets a preprocessor variable.
-defaultcompressionlevel or -dcl levelSpecifies the compression level used when none is specified via MediaTemplate or Media. Valid values are: none, low, medium, high, mszip. Default: medium. Equivalent MSBuild property: DefaultCompressionLevel
-ext idLoad a WiX extension for use during the build.
-includepath or -i pathFolder to search for include files.
-intermediateFolder pathOptional working folder. If not specified, a folder in %TMP% is created.
-loc pathLocalization file to use in the build. By default, .wxl files are recognized as localization.
-lib pathLibrary file to use in the build. By default, .wixlib files are recognized as libraries.
-src pathSource file to use in the build. By default, .wxs files are recognized as source code.
-out or -o pathDestination path of output. Required when there are multiple source files; otherwise, defaults to the base name of the source file.
-outputtype typeExplicitly set the output type if it cannot be determined from the output.
-pdb pathOptional path to output .wixpdb. Default will write .wixpdb beside output path.
-pdbtype typeSwitch to disable creation of .wixpdb. Types: full or none.

wix msi command

The wix msi command has the following subcommands:

SubcommandDescription
wix msi decompileConverts a Windows Installer database back into source code.
wix msi inscribeUpdates MSI database with cabinet signature information.
wix msi transformCreates an MST transform file.
wix msi validateValidates MSI database using standard or custom ICEs.

wix msi decompile subcommand

Decompile a package or merge module into WiX authoring or WiX data file.

wix msi decompile [options] {inputfile.msi|inputfile.msm}
OptionDescription
-dataDecompile into a WiX data file instead of WiX authoring.
-sctSuppress decompiling custom tables.
-sdetSuppress dropping empty tables.
-srasSuppress relative action sequencing.
-suiSuppress decompiling UI tables.
-type typeOptionally specify the input file type: msi or msm. If not specified, type is inferred by file extension.
-intermediateFolder pathOptional working folder. If not specified, a folder in %TMP% is created.
-out or -o pathOptional path for the decompiled output file. If not specified, output path will have the same base name as the input file in the same directory.
-x pathIf specified, export embedded binaries and icons to specified folder.

wix msi inscribe subcommand

Update an MSI package with the signatures of detached cabinets.

wix msi inscribe [options] input.msi
OptionDescription
-intermediateFolder pathOptional working folder. If not specified, a folder in %TMP% is created.
-out or -o pathOptional path for the inscribed package. If not specified, wix msi inscribe updates the input file in-place.

wix msi transform subcommand

Create a Windows Installer transform file (.mst).

msi transform [options] target.msi [updated.msi] -out output.mst
OptionDescription
-intermediateFolder pathOptional working folder. If not specified, a folder in %TMP% is created.
-out or -o pathRequired path for the transform file.
-pPreserve unchanged rows.
-pedanticShow pedantic messages.
-serr flagsSuppress error when applying transform; see Error flags below.
-t typeUse default validation flags for the specified transform type; see Transform types below.
-val flagsValidation flags for the transform; see Validation flags below.
-x pathIf specified, export embedded binaries and icons to specified folder.
-xoOutput transfrom as a WiX output instead of an MST file.
Error flag for -serrDescription
aIgnore errors when adding an existing row.
bIgnore errors when deleting a missing row.
cIgnore errors when adding an existing table.
dIgnore errors when deleting a missing table.
eIgnore errors when modifying a missing row.
fIgnore errors when changing the code page.
Validation flag for -valDescription
gUpgradeCode must match
lLanguage must match
rProduct ID must match
sCheck major version only
tCheck major and minor versions
uCheck major, minor, and upgrade versions
vUpgrade version < target version
wUpgrade version <= target version
xUpgrade version = target version
yUpgrade version > target version
zUpgrade version >= target version
Transform type for -tDescription
languageDefault flags for a language transform: abcdef and r
instanceDefault flags for an instance transform: abcdef and ruy
patchDefault flags for a patch transform: abcdef and grux

wix msi validate subcommand

Validates MSI database using standard or custom Internal Consistency Evaluators (ICEs).

msi validate [options] {inputfile.msi|inputfile.msm}
OptionDescription
-cub pathOptional path to a custom validation .CUBe file.
-ice idValidates only with the specified ICE. May be provided multiple times.
-intermediateFolder pathOptional working folder. If not specified, a folder in %TMP% is created.
-pdb pathOptional path to .wixpdb for source line information. If not provided, wix msi validate looks next to the input file.
-sice idSuppresses an ICE validator. May be provided multiple times.

wix burn command

The wix burn command has the following subcommands:

SubcommandDescription
wix burn detachDetach the Burn engine from a bundle so it can be signed.
wix burn extractExtract the internals of a bundle to a folder.
wix burn reattachReattach a signed Burn engine to a bundle.
wix burn remotepayloadGenerate source code for a remote payload.

wix burn detach and wix burn reattach subcommands

The wix burn detach and wix burn reattach subcommands are used to sign bundles. For details, see Signing bundles.

wix burn detach [options] original.exe -engine engine.exe
OptionDescription
-intermediateFolder pathOptional working folder. If not specified, a folder in %TMP% is created.
-engine pathPath for extracted bundle engine.
wix burn reattach [options] original.exe -engine signed.exe -o final.exe
OptionDescription
-intermediateFolder pathOptional working folder. If not specified, a folder in %TMP% is created.
-engine pathRequired path to Burn engine extracted using wix burn detach and then signed.
-out or -o pathRequired path to output bundle with reattached signed engine that can then be signed as a whole.

wix burn extract subcommand

Extracts the contents of a bundle.

wix burn extract [options] bundle.exe -o outputfolder
OptionDescription
-intermediateFolder pathOptional working folder. If not specified, a folder in %TMP% is created.
-out or -o pathTarget directory for extracted bundle containers. At least one of -out and -outba must be specified.
-outba or -oba pathTarget directory for extracted bootstrapper application container. At least one of -out and -outba must be specified.

wix burn remotepayload subcommand

Generate source code for a remote payload.

wix burn remotepayload [options] payloadfile [payloadfile ...]
OptionDescription
-basepath or -bp pathFolder as base to make payloads relative.
-bundlepayloadgeneration typeSets the package payload generation option; available types are: none, externalwithoutdownloadurl, external, all.
-downloadurl or -duSets the DownloadUrl attribute on the generated payloads.
-intermediateFolder pathOptional working folder. If not specified, a folder in %TMP% is created.
-out or -o pathDestination path of output source file.
-recurse or -rGenerate source code for all payloads in directory recursively.
-packagetype typeExplicitly set package type; available types are: bundle, exe, msu.
-usecertificateUse certificate to validate signed payloads. This option is not recommended.

wix extension command

Manage the extension cache. Extensions are referenced by:

  • id/version (uses specified version)
  • id (uses the latest available version)
note

When omitting version, wix extension commands could choose a version of an extension that is incompatible with the version of WiX you're running. Use a specific version to avoid that scenario. For example: wix extension add WixToolset.Util.wixext/5.0.1

SubcommandDescription
wix extension addAdd extension to the cache.
wix extension listList extensions in the cache.
wix extension removeRemove extension from the cache.
wix extension add|remove|list [options] [extensionRef]
OptionDescription
--global or -gManage the extension for the current user's WiX extension cache. If not specified, manages the extension relative to the current directory.

wix convert command

Convert v3 source code to v4 source code.

wix convert [options] sourceFile [sourceFile ...]

sourceFile can include wildcards like *.wxs.

OptionDescription
--custom-table typeConvert custom table authoring for use in MSI packages (msi) or bundles (bundle).
--dry-run or -nOnly display errors, do not update files.
--recurse or -rSearch for matching files in current dir and subdirs.
-set1pathPrimary settings file. No space between -set1 and file path.
-set2pathSecondary settings file (overrides primary). No space between -set2 and file path.
-indent:nIndentation multiple (overrides default of 4).

wix format command

Ensure consistent formatting of source code.

wix format [options] sourceFile [sourceFile ...]

sourceFile can include wildcards like *.wxs.

OptionDescription
--dry-run or -nOnly display errors, do not update files.
--recurse or -rSearch for matching files in current dir and subdirs.
-set1pathPrimary settings file. No space between -set1 and file path.
-set2pathSecondary settings file (overrides primary). No space between -set2 and file path.
-indent:nIndentation multiple (overrides default of 4).

convert/format settings

Test IDDescription
InspectorTestTypeUnknownInternal only: displayed when a string cannot be converted to an InspectorTestType.
XmlExceptionDisplayed when an XML loading exception has occurred.
WhitespacePrecedingNodeWrongDisplayed when the whitespace preceding a node is wrong.
WhitespacePrecedingEndElementWrongDisplayed when the whitespace preceding an end element is wrong.
DeclarationPresentDisplayed when the XML declaration is present in the source file.
DeprecatedLocalizationVariablePrefixInTextValueDisplayed when inner text contains a deprecated $(loc.xxx) reference.
UnauthorizedAccessExceptionDisplayed when a file cannot be accessed; typically when trying to save back a fixed file.
XmlnsMissingDisplayed when the xmlns attribute is missing from the document element.x
XmlnsValueWrongDisplayed when the xmlns attribute on the document element is wrong.x
DeprecatedLocalizationVariablePrefixInTextValueDisplayed when inner text contains a deprecated $(loc.xxx) reference.
DeprecatedLocalizationVariablePrefixInAttributeValueDisplayed when an attribute value contains a deprecated $(loc.xxx) reference.
AssignAnonymousFileIdAssign an identifier to a File element when on Id attribute is specified.
BundleSignatureValidationObsoleteSuppressSignatureValidation attribute is obsolete and corresponding functionality removed.
WixCABinaryIdRenamedWixCA Binary/@Id has been renamed to UtilCA.
QuietExecCustomActionsRenamedQtExec custom actions have been renamed.
QtExecCmdTimeoutAmbiguousQtExecCmdTimeout was previously used for both CAQuietExec and CAQuietExec64. For WixQuietExec, use WixQuietExecCmdTimeout. For WixQuietExec64, use WixQuietExec64CmdTimeout.
AssignDirectoryNameFromShortNameDirectory/@ShortName may only be specified with Directory/@Name.
BootstrapperApplicationDataDeprecatedBootstrapperApplicationData attribute is deprecated and replaced with Unreal for MSI. Use BundleCustomData element for Bundles.
AssignPermissionExInheritableInheritable is new and is now defaulted to 'yes' which is a change in behavior for all but children of CreateFolder.
ColumnCategoryCamelCaseColumn element's Category attribute is camel-case.
ColumnModularizeCamelCaseColumn element's Modularize attribute is camel-case.
InnerTextDeprecatedInner text value should move to an attribute.
AutoGuidUnnecessaryExplicit auto-GUID unnecessary.
FeatureAbsentAttributeReplacedThe Feature Absent attribute renamed to AllowAbsent.
FeatureAllowAdvertiseValueDeprecatedThe Feature AllowAdvertise attribute value deprecated.
PublishConditionOneUnnecessaryThe Condition='1' attribute is unnecessary on Publish elements.
AssignBootstrapperApplicationDpiAwarenessDpiAwareness is new and is defaulted to 'perMonitorV2' which is a change in behavior.
AssignVariableTypeFormattedThe string variable type was previously treated as formatted.
CustomActionKeysAreNowRefsThe CustomAction attributes have been renamed from BinaryKey and FileKey to BinaryRef and FileRef.
ProductAndPackageRenamedThe Product and Package elements have been renamed and reorganized.
ModuleAndPackageRenamedThe Module and Package elements have been renamed and reorganized.
DefaultMediaTemplateA MediaTemplate with no attributes set is now provided by default.
UtilRegistryValueSearchBehaviorChangeutil:RegistrySearch has breaking change when value is missing.
DisplayInternalUiNotConvertableDisplayInternalUI can't be converted.
InstallerVersionBehaviorChangeInstallerVersion has breaking change when omitted.
VerbTargetNotConvertableVerb/@Target can't be converted.
BootstrapperApplicationDllThe bootstrapper application dll is now specified in its own element.
BootstrapperApplicationDllRequiredThe new bootstrapper application dll element is required.
BalUseUILanguagesDeprecatedbal:UseUILanguages is deprecated, 'true' is now the standard behavior.
BalBootstrapperApplicationRefToElementThe custom elements for built-in BAs are now required.
RenameExePackageCommandToArgumentsThe ExePackage elements "XxxCommand" attributes have been renamed to "XxxArguments".
Win64AttributeRenamedThe Win64 attribute has been renamed. Use the Bitness attribute instead.
Win64AttributeRenameCannotBeAutomaticBreaking change: The Win64 attribute's value '{0}' cannot be converted automatically to the new Bitness attribute.
TagElementRenamedThe Tag element has been renamed. Use the element 'SoftwareTag' name.
IntegratedDependencyNamespaceThe Dependency namespace has been incorporated into WiX v4 namespace.
RemoveUnusedNamespacesRemove unused namespaces.
RemotePayloadRenamedThe Remote element has been renamed. Use the "XxxPackagePayload" element instead.
NameAttributeMovedToRemotePayloadThe XxxPackage/@Name attribute must be specified on the child XxxPackagePayload element when using a remote payload.
CompressedAttributeUnnecessaryForRemotePayloadThe XxxPackage/@Compressed attribute should not be specified when using a remote payload.
DownloadUrlAttributeMovedToRemotePayloadThe XxxPackage/@DownloadUrl attribute must be specified on the child XxxPackagePayload element when using a remote payload.
BurnHashAlgorithmChangedThe hash algorithm used for bundles changed from SHA1 to SHA512.
CustomTableNotAlwaysConvertableCustomTable elements can't always be converted.
CustomTableRefCustomTable elements that don't contain the table definition are now CustomTableRef.
RegistryKeyActionObsoleteThe RegistryKey element's Action attribute is obsolete.
TagRefElementRenamedThe TagRef element has been renamed. Use the element 'SoftwareTagRef' name.
SoftwareTagLicensedObsoleteThe SoftwareTag element's Licensed attribute is obsolete.
SoftwareTagTypeObsoleteThe SoftwareTag element's Type attribute is obsolete.
TargetDirDeprecatedTARGETDIR directory should no longer be explicitly defined.
DefiningStandardDirectoryDeprecatedStandard directories should no longer be defined using the Directory element.
ReferencesReplacedNaked UI, custom action, and property references replaced with elements.
BundlePackageCacheAttributeValueObsoleteCache attribute value updated.
MsuPackageKBObsoleteThe MsuPackage element contains obsolete '{0}' attribute. Windows no longer supports silently removing MSUs so the attribute is unnecessary. The attribute will be removed.
MsuPackagePermanentObsoleteThe MsuPackage element contains obsolete '{0}' attribute. MSU packages are now always permanent because Windows no longer supports silently removing MSUs. The attribute will be removed.
MoveNamespacesToRootNamespace should be defined on the root. The '{0}' namespace was move to the root element.
CustomActionIdsIncludePlatformSuffixCustom action ids have changed in WiX v4 extensions. Because WiX v4 has platform-specific custom actions, the platform is applied as a suffix: _X86, _X64, _A64 (Arm64). When manually rescheduling custom actions, you must use the new custom action id, with platform suffix.
StandardDirectoryRefDeprecatedThe {0} directory should no longer be explicitly referenced. Remove the DirectoryRef element with Id attribute '{0}'.
EmptyStandardDirectoryRefNotConvertableReferencing '{0}' directory directly is no longer supported. The DirectoryRef will not be removed but you will probably need to reference a more specific directory.
WixMbaPrereqLicenseUrlDeprecatedThe magic WixVariable 'WixMbaPrereqLicenseUrl' has been removed. Add bal:PrereqLicenseUrl="url" to a prereq package instead.
WixMbaPrereqPackageIdDeprecatedThe magic WixVariable 'WixMbaPrereqPackageId' has been removed. Add bal:PrereqPackage="yes" to the target package instead.
TargetDirRefRemovedA reference to the TARGETDIR Directory was removed. This may cause the Fragment that defined TARGETDIR to not be included in the final output. If this happens, reference a different element in the Fragment to replace the old reference to TARGEDIR.