WiX Installer Notes

2020.12.18

These are some old notes for the WiX (Windows Installer XML) toolset. Hopefully these will not be needed anytime soon.

WiX Toolset

InstEdit -- for viewing and comparing MSI files

Debugging MSI installer files

msiexec.exe is responsible for executing any *.msi file.

To enable full logging during installation:

msiexec.exe /I <file.msi> /L*vx log.txt

/L enables logging
'*' enables all output
'v' enables verbose logging
'x' enables extra debug information

MSI is a special type of database file in that it contains all of the content required for installation

Windows Installer Codes

Package Code - GUID - Uniquely Identifies a MSI File

Product Code - GUID - Uniquely Identifies a product release -- changes usually with the product version

Upgrade Code - GUID - Uniquely Identifies a set of related products -- supports upgrade functionality

Properties

Properties are used to store information (variables)

Property contains a name and value

Scope:

Details:

Required Properties:

Features and Components

Features:

Components:

Component Keypath:

Installation Types

Simple:

Administrative:

Advertisement:

Phases of Install

Sequences

Simple Install Sequences:

1. InstallUISequence
2. InstallExecuteSequence

Administrative Install Sequences:

1. AdminUISequence
2. AdminExecuteSequence

Advertisement Install Sequences:

1. AdvtExecuteSequence

Sequence Table Columns:

  1. Action - references a standard or custom action
  2. Condition - optional expression that determines if action is executed
  3. Sequence - defines the order in which the actions are executed

Actions

Standard Actions

Custom Action examples:

Type 1 Custom Action

Type 2 Custom Action

Type 17 / 18 Custom Actions

Type 19 Custom Action

Type 34 Custom Action

Type 35 Custom Action

Type 50 Custom Action

Type 51 Custom Action

Conditions

Used in:

Comparison Operators (both strings and ints):

Op  | Meaning
-------------
=   | Equal To
<>  | Not equal to
>   | Greater Than
<   | Less Than
>=  | Greater than or equal
<=  | Less than or equal

Strings:

String specific operators:

Op  | Meaning
-------------
><  | True if left string contains right string
<<  | True if left string starts with right string
>>  | True if left string ends with right string

Logical Operators:

Op  | Meaning
-------------
AND | True if both sides are true
OR  | True if at least one side is true
XOR | True if one side is true and the other is not
EQV | True if both sides are true or both are false
IMP | True if left side is false or right side is true
NOT | Negates the value of the logical expression to its right

Action and Install State Values:

State                   | Value | Meaning
-----------------------------------------
INSTALLSTATE_UNKNOWN    | -1    | No action for feature or component
INSTALLSTATE_ADVERTISED |  1    | Advertised feature (features only)
INSTALLSTATE_ABSENT     |  2    | Feature or component not present
INSTALLSTATE_LOCAL      |  3    | Feature or component locally installed
INSTALLSTATE_SOURCE     |  4    | Feature or component accessed from source

Built In Properties:

Formatted Text

Formatted Strings:

string         | Meaning
-------------------------------------
[PropertyName] | Replaced by the value of the property
[DirectoryKey] | Replaced by the path of the directory
[%EnvVar]      | Replaced by the value of the environment variable
[#FileKey]     | Replaced by the full path to the file on the target machine