InstallShield 条件功能安装

编程入门 行业动态 更新时间:2024-10-10 12:19:45
本文介绍了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 中默认的 INSTALLLEVEL 是 100 (可调).

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.

一些链接:

  • 未选择的功能正在安装(超过你不想了解功能)
  • 失败条件wix(为什么不能默认将功能级别设置为0)
  • 如何在wix中根据条件设置功能级别?(WiX中的类似问题)
  • 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 条件功能安装

本文发布于:2023-11-13 03:15:07,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1583269.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:条件   功能   InstallShield

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!