Wix InstallExecuteSequence throws error on supporting 47th msi instance

The error is thrown while supporting the 47th instance. It runs fine if I remove the action SetMyInstance_Instance47. I need to support 100 instances. The code snippet is as below.

<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: The InstallExecuteSequence table contains an action 'SetMsiNewInstance' which cannot have a unique sequence number because it is scheduled before or after action 'AppSearch'. There is not enough room before or after this action to assign a unique sequence number. Please schedule one of the actions differently so that it will be in a position with more sequence numbers available. Please note that sequence numbers must be an integer in the range 1 - 32767 (inclusive).

1 answer

  • answered 2020-05-27 20:24 Christopher Painter

    MSI doesn't have to have unique sequence numbers. Multiple actions can have the same sequence number it just isn't promised which will run first. If all of these instances are mutually exclusive it wouldn't matter.

    The other option would be to have 1 custom action that reads from a custom table and does the same processing but only taking up one sequence position.