Bootstrapper Manifest Generator 的注册表搜索允许您获取任何键的注册表值。
但是,如果该键不存在,它会返回什么?
因为我希望根据是否存在特定的注册表项来安装先决条件。
如果存在,则不安装先决条件,否则安装。
这个怎么做..?
Bootstrapper Manifest Generator 的注册表搜索允许您获取任何键的注册表值。
但是,如果该键不存在,它会返回什么?
因为我希望根据是否存在特定的注册表项来安装先决条件。
如果存在,则不安装先决条件,否则安装。
这个怎么做..?
它可以通过在BypassIf元素中使用ValueExists比较来轻松实现:
<Product xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" ProductCode="AAA">
<InstallChecks>
<RegistryCheck Property="IsInstalled" Key="HKCU\Software\ABC Software\ABC" Value="Installed" />
</InstallChecks>
<Commands Reboot="Defer">
<Command PackageFile="setup.exe" EstimatedInstallSeconds="15" >
<InstallConditions>
<BypassIf Property="IsInstalled" Compare="ValueExists" />
</InstallConditions>
</Command>
</Commands>
...
</Product>