InstallShield条件功能安装

编程入门 行业动态 更新时间:2024-10-10 14:26:24
本文介绍了InstallShield条件功能安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

仅在注册表值包含特定值的情况下,如何才能在InstallShield项目上安装功能?该值可能只是是或否。

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 密钥:软件\MyKey\the_key_to_check

Root : HKLM Key : Software\MyKey\the_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 概念由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 =否 (在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.

某些链接 :

Some Links:

  • 未安装的未选择功能(比您不希望了解的功能更多)
  • 失败条件错误(为什么默认情况下不得将功能级别设置为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:22,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1583270.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:条件   功能   InstallShield

发布评论

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

>www.elefans.com

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