There are few elements in the WiX toolset where the order matters. The
Chain element in the
Bundle is one of them. The Burn engine installs, repairs, and uninstalls packages in the order they are defined in the
Chain element according to the following rules.
Install, repair, modify
When Burn engine plans an install, repair, or modify action the packages are ordered according to their order in the
Chain. Conditions or overrides by the BootstrapperApplication may cause packages to be skipped but the packages always execute in the same order.
When the Burn engine plans an uninstall operation the packages are in exact reverse order specified by the
Chain. This is important so that framework packages which are necessary for packages later in the stay present until the dependent packages are removed.
When the Burn engine plans an install, repair, or modify then all related bundles are planned last. Thus related bundles always execute after the install/repair/modify chain. When planning an uninstall, the Burn engine plans all related bundles first. Thus related bundles are always removed before the chained packages are removed.
There is currently no way to modify the execution order of a
Chain after a
Bundle is built.