While extending a WIX-installer that I have to maintain, I ran into the following problem – when shown the tree of features and components, the product feature is not selected by default.
I tried different variations, including adding InstallDefault ='local', TypicalDefault ='install', and Absent = 'disallow', however, the feature is still disabled.
Here is the code that describes the feature:
<Feature Id="Complete" Level="1"
Display='expand'
InstallDefault ='local'
TypicalDefault ='install'
Absent = 'disallow'
Title="$(var.ProductName)">
<ComponentGroupRef Id="Required_files"/>
<?ifdef InstallDriver?>
<ComponentGroupRef Id='driver_files'/>
<?endif?>
<ComponentRef Id="ProgramMenuShortcuts"/>
<ComponentRef Id="ProductInfo"/>
<?ifdef RemoveAllRegKeys?>
<ComponentRef Id="RegRemoveAll"/>
<?endif?>
<ComponentGroupRef Id="FBmodule"/>
</Feature>
Having examined the logs, I see some entries that seem to be related to this (this is happening when I manually set the feature to “install to local hard disk”).
MSI (c) (FC:90) [16:43:57:559]: PROPERTY CHANGE: Adding MsiSelectionTreeSelectedFeature property. Its value is 'Complete'.
MSI (c) (FC:90) [16:43:57:559]: PROPERTY CHANGE: Adding MsiSelectionTreeSelectedAction property. Its value is '2'.
MSI (c) (FC:90) [16:43:57:559]: PROPERTY CHANGE: Adding MsiSelectionTreeSelectedCost property. Its value is '0'.
Action 16:43:57: FeaturesDlg. Dialog created
MSI (c) (FC:90) [16:51:44:645]: Note: 1: 2727 2:
.... many repetitions of Note: 1: 2727 2:
MSI (c) (FC:90) [16:51:45:146]: Note: 1: 2727 2:
MSI (c) (FC:90) [16:51:45:630]: Note: 1: 2205 2: 3: MsiAssembly
MSI (c) (FC:90) [16:51:45:630]: Note: 1: 2228 2: 3: MsiAssembly 4: SELECT `MsiAssembly`.`Attributes`, `MsiAssembly`.`File_Application`, `MsiAssembly`.`File_Manifest`, `Component`.`KeyPath` FROM `MsiAssembly`, `Component` WHERE `MsiAssembly`.`Component_` = `Component`.`Component` AND `MsiAssembly`.`Component_` = ?
MSI (c) (FC:90) [16:51:45:630]: Note: 1: 2205 2: 3: _RemoveFilePath
MSI (c) (FC:90) [16:51:45:639]: Note: 1: 2727 2:
MSI (c) (FC:90) [16:51:45:647]: PROPERTY CHANGE: Modifying MsiSelectionTreeSelectedAction property. Its current value is '2'. Its new value: '3'.
MSI (c) (FC:90) [16:51:45:647]: PROPERTY CHANGE: Modifying MsiSelectionTreeSelectedCost property. Its current value is '0'. Its new value: '7318'.
I suspect that this could be related to the fact that there is a custom dialog in the installer – but having looked through the source I could not find anything that would indicate a relationship between the state of the feature and something else in the project.
What are the recommended troubleshooting steps?
Here is the full installation log.
I found the culprit. The installer itself is fine, the problem is in how it is started.
There is a BAT file that I use for testing purposes, it runs the MSI with some command line arguments that simulate different conditions.
The command line arguments REINSTALL=ALL REINSTALLMODE=vomus must only be applied when the installer updates the program; when started that way on a clean system – the progress bar moves and everything goes as expected, but nothing is actually installed.
In other words, the error was in the method of testing.