在支持第47个实例时抛出了错误。如果我删除SetMyInstance_Instance47这个动作,它就能正常运行。我需要支持100个实例。代码片段如下。
<InstallExecuteSequence>
<Custom Action="SetMyInstance_Instance46" After="SetMyInstance_Instance45"><![CDATA[ACTION = "INSTALL" AND MYINSTANCE = "DontUseThis" AND (INSTANCE46INSTALLEDPRODUCTCODE = "" AND INSTANCE46INSTALLEDPRODUCTCODE64 = "" AND INSTANCE46INSTALLEDPRODUCTCODE32 = "") AND SECONDEXECUTE <> 1 ]]></Custom>
<Custom Action="SetMyInstance_Instance47" After="SetMyInstance_Instance46"><![CDATA[ACTION = "INSTALL" AND MYINSTANCE = "DontUseThis" AND (INSTANCE47INSTALLEDPRODUCTCODE = "" AND INSTANCE47INSTALLEDPRODUCTCODE64 = "" AND INSTANCE47INSTALLEDPRODUCTCODE32 = "") AND SECONDEXECUTE <> 1 ]]></Custom>
</InstallExecuteSequence>
Wix Error:InstallExecuteSequence表包含一个动作 "SetMsiNewInstance",它不能有一个唯一的序列号,因为它被安排在动作 "AppSearch "之前或之后。 在这个操作之前或之后没有足够的空间来分配一个唯一的序列号。 请以不同的方式安排其中一个动作,使其处于有更多序列号可用的位置。 请注意,序列号必须是1-32767(含)范围内的整数。
MSI不一定要有唯一的序列号。 多个动作可以有相同的序列号,只是不答应哪个先运行。 如果这些实例都是相互排斥的,那就无所谓了。
另一种选择是有1个自定义的动作,从自定义的表中读取并做同样的处理,但只占用一个序列位置。
为了诊断--首先(在任何修复之前),请尝试以下方法。
InstallExecuteSequence
,排序为 Sequence
右栏)。=> 结论? 你需要更大的标准动作之间的差距。至少这是你需要的事情之一。你真正需要做的是停止使用这么多实例:-)。
你可以尝试手动设置序列号,并且你可以给标准动作分配新的编号。
<InstallExecuteSequence>
<..>
<!-- Redefine standard action numbers -->
<LaunchConditions Sequence='300'></LaunchConditions>
<FindRelatedProducts Sequence='2'></FindRelatedProducts>
<..>
<!-- Manually assign custom action sequence numbers -->
<Custom Sequence="44" Action='SomethingDoneHere1' />
<Custom Sequence="45" Action='SomethingDoneHere2' />
<..>
</InstallExecuteSequence>