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.
Declaring and setting properties
To declare a property, add a Property
element to your WiX markup anywhere inside the Product
element. A Property
element only needs two attributes: Id
and Value
. The Id
sets the name of the property, used later to reference it, and Value
sets the data contained inside. The following example creates a new property called myProperty
and sets its value to the string my value
:
<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, and periods. When referencing it, it's case sensitive. So, MyPropertyId
is not the same as MyPropertyID
.
The data in Value
can be almost any string. If you need to use double quotes in the value, you can either...