我在vs 2010中创建了一个自定义Bootstrapper软件包。但如果已经安装了先决条件,我就不能通过它。如果已经安装了先决条件,我需要跳过先决条件的安装并继续安装我的应用程序。
在Product.xml中,我有以下几行
<Product xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" ProductCode="Winpcap.Package">
<PackageFiles>
<PackageFile Name="WinPcap 4.1.3.exe"/>
</PackageFiles>
<InstallChecks>
<MsiProductCheck Product="WinPcapInst" Property="IsMsiInstalled"/>
</InstallChecks>
<Commands>
<Command PackageFile="WinPcap 4.1.3.exe" Arguments="">
<InstallConditions>
<BypassIf Property="IsMsiInstalled" Compare="ValueGreaterThan" Value="0"/>
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success"/>
<ExitCode Value="1641" Result="SuccessReboot"/>
<ExitCode Value="3010" Result="SuccessReboot"/>
<DefaultExitCode Result="Fail" String="GeneralFailure"/>
</ExitCodes>
</Command>
</Commands>
</Product>
但我不能跳过先决条件安装。在安装日志中,我有以下信息
“属性:[IsMsiInstalled] = -2 {int} 在属性'IsMsiInstalled'和值'0'上运行运算符'ValueGreaterThan'的结果:false“
如果已安装先决条件,则无法设置属性“IsMsiInstalled”。请咨询
提前致谢