我正在使用Wix Toolset v3.11,并使用WixStandardBootstrapperApplication创建了Bootstrapper。这非常简单,并将我的.msi和从属产品的.msi链接在一起。
<Chain>
<MsiPackage SourceFile="$(var.MySetupProject.TargetPath)" Id="MyId" Vital="yes">
<MsiProperty Name="INSTALLFOLDER" Value="[InstallFolder]" />
</MsiPackage>
<MsiPackage Visible="yes" DisplayName="Dependency (64-bit)"
DownloadUrl="https://myDownloadUrl/Dependency-64.msi"
SourceFile="..\Dependency-64.msi"
Compressed="no"
InstallCondition="VersionNT64"/>
<MsiPackage Visible="yes" DisplayName="Dependency (32-bit)"
DownloadUrl="https://myDownloadUrl/Dependency-32.msi"
SourceFile="..\Dependency-32.msi"
Compressed="no"
InstallCondition="NOT VersionNT64"/>
</Chain>
在我的产品的.msi中,我创建了一些版本控制条件,如果使用自定义操作将其匹配,则会显示一个错误对话框。
<Upgrade Id="PUT-GUID-HERE">
<UpgradeVersion OnlyDetect="yes" Property="SELFFOUND" Minimum="!(bind.FileVersion.MainEXE)" IncludeMinimum="yes" Maximum="!(bind.FileVersion.MainEXE)" IncludeMaximum="yes" />
<UpgradeVersion OnlyDetect="yes" Property="NEWERFOUND" Minimum="!(bind.FileVersion.MainEXE)" IncludeMinimum="no" />
<UpgradeVersion OnlyDetect="yes" Property="PREVFOUND_IA" Minimum="1.0.0.0" IncludeMinimum="yes" Maximum="4.11.7312.0" IncludeMaximum="yes" />
<UpgradeVersion OnlyDetect="no" Property="PREVIOUSFOUND" Minimum="4.11.7313.0" IncludeMinimum="yes" Maximum="!(bind.FileVersion.MainEXE)" IncludeMaximum="no" />
</Upgrade>
<CustomAction Id="UninstallOldAlert" Error="[ProductName] is already installed. Please remove via Add/Remove Programs first." />
<CustomAction Id="AlreadyUpdated" Error="[ProductName] is already installed." />
<CustomAction Id="NoDowngrade" Error="A later version of [ProductName] is already installed." />
<InstallExecuteSequence>
<RemoveExistingProducts After="InstallInitialize">PREVIOUSFOUND</RemoveExistingProducts>
<Custom Action="UninstallOldAlert" After="FindRelatedProducts">PREVFOUND_IA</Custom>
<Custom Action="AlreadyUpdated" After="FindRelatedProducts">SELFFOUND</Custom>
<Custom Action="NoDowngrade" After="FindRelatedProducts">NEWERFOUND</Custom>
</InstallExecuteSequence>
如果仅运行.msi,它将正确显示错误消息并关闭,但是,当我运行引导程序时,它将跳过并安装依赖项。我想发生的是将错误传递给引导程序,但是我似乎找不到任何有关执行此操作的说明?我曾尝试在捆绑软件的包装上设置DisplayInternalUI,但这无效。
运行.msi并希望在引导程序中看到的消息是名为“ UninstallOldAlert”的CustomAction。>
如果需要,愿意提供更多信息,在此先感谢。
UPDATE:
我也尝试过在我的Product元素中使用Condition元素,但这具有相同的行为,它将成功传递给引导程序。 :(
我正在使用Wix Toolset v3.11,并使用WixStandardBootstrapperApplication创建了Bootstrapper。这非常简单,并将我的.msi和从属产品的.msi链接在一起。 <...>
刻录不会运行过时的软件包。您可以在捆绑包日志中验证该信息,以查看刻录为您的软件包检测和计划了什么。