Skip to main content

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 package file is actually generated (bind time). WiX variables do not persist into the package file, so they cannot be used when an MSI file is being installed; it's a WiX-only concept.

Parents

Bundle, Package, Module, Fragment

Attributes

Id (String, required) : The name of the variable.

Overridable (YesNoTypeUnion) : 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 -dname=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'.

Value (String, required) : The value of the variable. Note that because values are substituted at bind time, they skip all the validation done at compile time, which can be more thorough than validation done at bind time.

Edit the schema for this page