好的, 排序它,所以我最好发布我的解决方案。
最终把它归结为两个部分...
一)在每个产品微星的这是在安装时设置的设置注册表项。显然,如果最初未安装该MSI,则该注册表项将不存在。即
<!-- registry entry to state that the item has been installed-->
<Component Id="cmp_WriteToRegistry" Guid="[yourguid]">
<RegistryKey Root="HKLM"
Key="Software\MyCompany]"
Action="createAndRemoveOnUninstall">
<RegistryValue Type="integer" Name="ProductA" Value="1" KeyPath="yes"/>
</RegistryKey>
</Component>
B)做升级时,检查烧伤该注册表项的存在......
<!-- Determine what items are to be installed in the event of an install using the BA-->
<WixVariable Id="chkProductA" Value="![CDATA[chkProductA]]" />
<WixVariable Id="chkProductB" Value="![CDATA[chkProductB]]" />
<WixVariable Id="chkProductC" Value="![CDATA[chkProductC]]" />
<!-- Determine what items are installed in the event of an upgrade-->
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\MyCompany" Value="ProductAInstalled" Variable="ProductAInstalled" Result="exists" />
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\MyCompany" Value="ProductBInstalled" Variable="ProductBInstalled" Result="exists" />
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\MyCompany" Value="ProductCInstalled" Variable="ProductCInstalled" Result="exists" />
<Chain>
<MsiPackage SourceFile="..\SetupProductA\bin\Release\SetupProductA.msi"
InstallCondition="chkProductA OR ProductAInstalled" />
<MsiPackage SourceFile="..\SetupProductB\bin\Release\SetupProductB.msi"
InstallCondition="(chkProductB) OR (ProductBInstalled)" />
<MsiPackage SourceFile="..\SetupProductC\bin\Release\SetupProductC.msi"
InstallCondition="(chkProductC) OR (ProductCInstalled)" />
</Chain>
</Bundle>
所以在InstallCondition,当使用UI chkProductA计算结果为真,相应的复选框会被检查,并且 ProductAInstalled在相应的产品已经安装时评估为真 - 照顾在我的情况下没有任何用户交互发生的更新。
简单,当你知道如何。我当然没有下手......
旧礼仪再次回答你自己的问题......如果有人有更好的答案,我会很高兴听到它,好像上面是答案,它可能不是最好的。如果一个星期左右没有更好的答案,我会将其设置为答案。我不是钓鱼点,所以猜测这是正确的事情... –
你的解决方案是我将如何做到这一点。它类似于“记住属性模式”:http://robmensching.com/blog/posts/2010/5/2/The-WiX-toolsets-Remember-Property-pattern – BryanJ
谢谢布赖恩。我仍然在初学者/重新发明轮子阶段,所以很高兴知道。 –