Close

WIX – The Installation Sequence

there are two tables in the MSI database, that contain the order in which installation events should occur, they are:

  • InstallUISequence
    InstallExecuteSequence InstallUISequence
  • InstallExecuteSequence
    InstallExecuteSequence

 

InstallUISequence

This covers the first half of the install process. during this period there are no acual changes applied to the machine. Instead it is the msi ask for input from the user, and checks whether the machine meets it's pre-requisites (e.g. correct version of .net installed)

there are a number of standard actions (i.e. non-custom-actions) that can be added to this table

 

  • FindRelatedProducts
  • AppSearch
  • LaunchConditions
  • ValidateProductID
  • CostInitialize
  • FileCost
  • CostFinalize
  • MigrateFeatureStates
  • ExecuteAction

this side is run under the msi initiating user's privelege (aka client side)

 

InstallExecuteSequence

This is the 2-half ot the install process and happens after   InstallUISequence has completed. This is where the actual install happens and includes tasks like:

  • copying files to target directories
  • updating the registry
  • add a new entry to "Program and Features"

This sequence is run using the localsystem user's privilege (aka server side). Here are the standard actions that takes place here:

  • InstallValidate - double checks that there is enough disk space, and relevant files have not been locked by running processes
  • InstallInitialize   - a bit like taking a snapshot, so that rollbacks can happen easily. This prevents any partial installs.
  • ProcessComponents
  • UnpublishFeatures - only occurs when uninstalling an msi. It is ignored during the install.
  • RemoveRegistryValues - only occurs when uninstalling an msi. It is ignored during the install.
  • RemoveShortcuts - only occurs when uninstalling an msi. It is ignored during the install.
  • RemoveFiles - only occurs when uninstalling an msi. It is ignored during the install.
  • InstallFiles -
  • CreateShortcuts
  • WriteRegistryValues
  • RegisterUser
  • RegisterProduct - registers your product with Programs and Features and stores a copy of the MSI package in the Windows Installer Cache, found at %WINDIR%\Installer.
  • PublishFeatures
  • PublishProduct
  • InstallFinalize

(note , it might also do the actions of the first-half, if for any reason they failed to happen during the 1st half)