So, I have a product installer authored using WiX which is failing to upgrade correctly once the 'Microsoft_VC100_CRT_x86.msm' merge module is incorporated. The old product is not removed during the installation. If the merge modules are removed from the project the removal of the old version takes place as it should.
The merge module is included quite simply under a Directory node:
<Directory Id="ProgramFilesFolder">
<Merge Id="VC10_CRT_MergeId1" Language="0" SourceFile="c:\\Program Files (x86)\\Common Files\\Merge Modules\\Microsoft_VC100_CRT_x86.msm" DiskId="1" />
... other stuff
</Directory>
and then referenced in the features:
<Feature Id="MainFeature" Title="Core Files" Level="1">
<MergeRef Id="VC10_CRT_MergeId1" />
... other stuff
</Feature>
I am incrementing the version number of the product but the upgrade fails to happen and the new version is installed over the old version but without performing a correct upgrade - both versions are listed in 'Add or Remove Programs'.
The old product should be removed as follows:
<InstallExecuteSequence>
<RemoveExistingProducts After='InstallValidate'/>
</InstallExecuteSequence>
I have also tried various other positions for RemoveExistingProducts as per http://jpassing.com/2007/06/16/where-to-place-removeexistingproducts-in-a-major-msi-upgrade/, with the same results.
In the verbose log for the installer the following is seen:
MSI (s) (AC:44) [19:48:22:300]: Doing action: RemoveExistingProducts
MSI (s) (AC:44) [19:48:22:300]: Note: 1: 2205 2: 3: ActionText
Action start 19:48:22: RemoveExistingProducts.
MSI (s) (AC:44) [19:48:22:300]: Note: 1: 2205 2: 3: Error
MSI (s) (AC:44) [19:48:22:300]: Note: 1: 2228 2: 3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 22
MSI (s) (AC:44) [19:48:22:301]: Note: 1: 2205 2: 3: Error
MSI (s) (AC:44) [19:48:22:301]: Note: 1: 2228 2: 3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 23
MSI (s) (AC:44) [19:48:22:301]: Note: 1: 2205 2: 3: Error
MSI (s) (AC:44) [19:48:22:301]: Note: 1: 2228 2: 3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 16
MSI (s) (AC:44) [19:48:22:301]: Note: 1: 2205 2: 3: Error
MSI (s) (AC:44) [19:48:22:301]: Note: 1: 2228 2: 3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 21
Action ended 19:48:22: RemoveExistingProducts. Return value 1.
In the WiX build log I get the following (but from memory this is normal with the VC runtime msms?):
1>light.exe(0,0): warning LGHT1076: ICE82: This action SystemFolder_x86_VC.F1DD796A_B984_3DCA_A68D_6B352BDC86F3 has duplicate sequence number 1 in the table InstallExecuteSequence
1>light.exe(0,0): warning LGHT1076: ICE82: This action SystemFolder_x86_VC.F1DD796A_B984_3DCA_A68D_6B352BDC86F3 has duplicate sequence number 1 in the table InstallUISequence
1>light.exe(0,0): warning LGHT1076: ICE82: This action SystemFolder_x86_VC.F1DD796A_B984_3DCA_A68D_6B352BDC86F3 has duplicate sequence number 3 in the table AdminExecuteSequence
1>light.exe(0,0): warning LGHT1076: ICE82: This action SystemFolder_x86_VC.F1DD796A_B984_3DCA_A68D_6B352BDC86F3 has duplicate sequence number 3 in the table AdminUISequence
1>light.exe(0,0): warning LGHT1076: ICE82: This action SystemFolder_x86_VC.F1DD796A_B984_3DCA_A68D_6B352BDC86F3 has duplicate sequence number 3 in the table AdvtExecuteSequence
The InstallExecuteSequence in the msi looks like the following:
If the merge module is removed (it needs to be included due to updated files in the installer) then the upgrade works as expected. Is this a bug in the merge module stuff/WiX/Windows Installer, or am I doing something wrong?