InstallShield conditional feature installation

后端 未结 1 1612
慢半拍i
慢半拍i 2021-01-25 02:23

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

相关标签:
1条回答
  • 2021-01-25 02:43

    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: 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:

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

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

    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:

    • 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)
    0 讨论(0)
提交回复
热议问题