Custom properties
You'll often need to define and set custom properties to hold your install time data. In the following sections, we will explore the meaning of WiX properties and how best to use them. I should say that properties are not just a feature of WiX, but are innate to Windows Installer itself. So, additional information about them can be found in the Windows Installer documentation.
Declaring and setting properties
To declare a property, add a Property
element to your WiX markup. A Property
element only needs two attributes: Id
and Value
. The Id
attribute sets the name of the property, and the Value
attribute sets the data contained inside. The following example creates a new property called myProperty
and sets its value to the string my value
. Note that this can go anywhere inside the Product
element.
<Property Id="myProperty" Value="my value" />
Id
should begin with either a letter or underscore and consist of only lower and uppercase letters, numbers, underscores...