InstallShield 条件功能安装 [英] InstallShield conditional feature installation

查看:32
本文介绍了InstallShield 条件功能安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使我的 InstallShield 项目中的某个功能仅在注册表值包含特定值时才能安装?该值可能只有YES"或NO".

How can I make a feature on my InstallShield project to be installed only if a registry value contains a certain value? That value may be only "YES" or "NO".

我尝试像这样配置系统搜索:

I tried to configure a System Search like that :

根:HKLM密钥:SoftwareMyKey he_key_to_check

Root : HKLM Key : SoftwareMyKey he_key_to_check

值:我让它空白

将值存储在此属性中:ISVALUE(刚刚创建的属性,没有任何值),并且仅将值存储在属性中".

Store the value in this property : ISVALUE (a just created property, without any value), and "just store the value in the property".

然后,根据我的功能条件:安装级别:1条件:等级:200,ISVALUE=YES

Then, on my feature condition : Install Level : 1 Condition : Level:200, ISVALUE=YES

尝试的结果是 -> 如果 MyValue 等于 YES,则安装该功能,如果不是,则不安装该功能.但它的条件似乎从未被评估过.

The attempted result is -> If MyValue equals YES, then install that feature, if not, don't install that feature. But it the condition seems to be never evaluated.

谁能帮我完成这项任务?

Could anyone help me to perform this task?

推荐答案

INSTALLLEVEL:INSTALLLEVEL快速回顾strong> 概念由 Chris Painter 提供:设置子功能默认不安装.本质上:每个功能都有一个级别值,整个设置都有一个整体 INSTALLLEVEL.INSTALLLEVEL 或以下的每个功能都会默认安装.我认为 Installshield 中默认的 INSTALLLEVEL100 (可调).

INSTALLLEVEL: Quick review of the INSTALLLEVEL concept courtesy of Chris Painter: Set sub-features to not install by default. Essentially: there is a level value for every feature and an overall INSTALLLEVEL for the whole setup. Every feature at or below the INSTALLLEVEL gets installed by default. I think the default INSTALLLEVEL in Installshield is 100 (adjustable).

Installshield:这是带有 Installshield 屏幕截图的功能条件示例:在 InstallShield Basic MSI 项目中预选功能.一个特殊情况是当您将 Level 设置为 0 - 然后您不安装该功能并隐藏它来自设置 GUI(请参阅下面的链接,了解为什么将其设置为功能的默认值是一个非常糟糕的主意 - 我认为可以在条件下分配,但不要使其成为默认值).

Installshield: Here is a feature condition sample with Installshield screenshots: Preselecting Features within an InstallShield Basic MSI Project. A special case is when you set the Level to 0 - then you do not install the feature and also hide it from the setup GUI (see link below on why this is a very bad idea to set as default for a feature - I think it is OK to assign in a condition however, just don't make it default).

建议:你可以试试这样的:

Suggestions: You could try something like this:

  • 选项 1:级别:0,条件:ISVALUE=NO(在 GUI 中隐藏功能,如果 ISVALUE=NO,则不安装功能)

  • Option 1: Level: 0, Condition: ISVALUE=NO (hide feature in GUI and do not install feature if ISVALUE=NO)

选项 2:级别:101,条件:ISVALUE=NO(如果 ISVALUE=NO,请勿安装功能)

Option 2: Level: 101, Condition: ISVALUE=NO (do not install feature if ISVALUE=NO)

对于这两个选项,请记住将默认功能级别设置为默认安装".换句话说,等于或低于设置的整体 INSTALLLEVEL.例如 100.

For both options, remember to set the default feature level to "install by default". In other words at or below the setup's overall INSTALLLEVEL. For example 100.

一些链接:

  • Unselected Feature Being Installed (more than you don't want to know about features)
  • Failing condition wix (why you must not set feature level to 0 by default)
  • How to set the level of feature based on condition in wix? (similar issue in WiX)

这篇关于InstallShield 条件功能安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆