Skip to main content
Version: v3

WixVariable Element

This element exposes advanced WiX functionality. Use this element to declare WiX variables from directly within your authoring. WiX variables are not resolved until the final msi/msm/pcp file is actually generated. WiX variables do not persist into the msi/msm/pcp file, so they cannot be used when an MSI file is being installed; it's a WiX-only concept.
Windows Installer references
Bundle, Fragment, Module, Product
Inner Text
IdStringThe name of the variable.Yes
OverridableYesNoType Set this value to 'yes' in order to make the variable's value overridable either by another WixVariable entry or via the command-line option -d<name>=<value> for light.exe. If the same variable is declared overridable in multiple places it will cause an error (since WiX won't know which value is correct). The default value is 'no'.  
ValueString The value of the variable. The value cannot be an empty string because that would make it possible to accidentally set a column to null. Yes
See Also
Wix Schema