I've a burn installation whereby the user can select which of three options to install – each one directly relates to one of three MsiPackages in a chain, such as :
<Chain>
<MsiPackage SourceFile="..\ProductA\bin\Release\ProductA.msi" InstallCondition="chkProductA" />
<MsiPackage SourceFile="..\ProductB\bin\Release\ProductB.msi" InstallCondition="chkProductA" />
<MsiPackage SourceFile="..\ProductC\bin\Release\ProductC.msi" InstallCondition="chkProductC" />
</Chain>
All fine. However, when I run the msi next time, I only want to re-install/update the items that were selected originally – ie if only productA was selected, I don't want to install products B & C.
How do I determine what was originally selected?
Best Answer
OK, Sorted it, so I'd best post my solution.
Ultimately it boils down to two parts...
a) setting a registry key in each of the Product MSI's which are set on installation. Obviously if that MSI was not installed originally, then the registry entry will not exist. i.e.
b) Checking for the existence of that registry key in burn when doing the upgrade...
So in the InstallCondition, chkProductA evaluates to true when the UI is used and the respective checkbox is checked, and ProductAInstalled evaluates to true when the respective product has already been installed - taking care of the update which in my case happens without any user interaction.
Easy when you know how. I certainly didn't to start with...