我有一个 WIX 安装程序,它可以从外部 CAB 文件安装一些未版本控制的文件。
我的问题是我被告知在 InstallInitialize 之前我需要 RemoveExistingProducts 才能正确升级未版本化的文件。但是,它似乎被外部 cab 文件吓坏了,并不断给我一个错误,即该文件不在 CAB 文件中(即使它在)。
如果 RemoveExistingProducts 在 InstallExecute 之后,它第一次使用 CAB 文件正确安装,但在升级过程中不会升级文件
以下是一些片段:
<Media Id="2" Cabinet="Videos.cab" EmbedCab="no" CompressionLevel="none" />
...
<Component Id="Video01" Guid="{FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF}" DiskId="2" >
<File Id="Video01.wmv" DiskId="2" Vital="no" Source="BLAH.wmv" Name="Video01.wmv"/>
</Component>
...
<InstallExecuteSequence>
<Custom Action="PreventDowngrading" After="FindRelatedProducts">NEWERPRODUCTFOUND</Custom>
<!--<RemoveExistingProducts After="InstallExecute" />-->
<RemoveExistingProducts Before="InstallInitialize" />
</InstallExecuteSequence>