cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
firmusoft
Level 5

Feature dependency

Hi all

We are working on a basic MSI project and trying to implement Feature dependency.

So we have A, B, C as visible (and optional) features and D as a hidden feature that has some dependent components for A & B. Basically if A OR B is selected for install, then D also need to be installed.

Install levels on A, B, C are 1 and that on D is 200 (project INSTALLEVEL is default 100)

First we tried to set a condition (&A = 3 OR &B = 3) on the Feature D that sets level = 1 when condition is true. But I believe the condition is evaluated (during Costfinalize) before the custom feature selection dialog is displayed, so didnt get the expected result.

Secondly added a custom installscript action to run after MigrateFeatureStates in the Exec Sequence. The script uses MsiViewModify to update the level field of the View => SELECT * FROM `Feature` WHERE `Feature`='D'. The function is invoked after the feature selection dialog as expected, and the return codes of MsiViewModify is also SUCCESS, but its found that components in feature D are not installed locally.

Any suggestions on how to get the desired behavior?

Thanks
Labels (1)
0 Kudos

(2) Replies
firmusoft
Level 5

Shekar wrote:
for msi projects, check below link.

http://kb.flexerasoftware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=Q208877&sliceId=1&docTypeID=DT_HOWTO_1_1&dialogID=125365737&stateId=0%200%20125367234


Thanks for the response Shekhar... The example you pointed to, shows how to dynamically update the selection of a dependent feature in the custom setup dialog, when a feature is selected. It uses two dialogs to emulate refreshing of the window. To extend this to a production level behavior (uncheck dependent feature when the other feature is deselected, to simulate this behavior for all the features and dependencies etc) might be ratehr difficult.. one can end up with several additional dialogs..

In our case, we are not really worried about the "UI".. For example, if feature A is selected, then a dependent feature B also need to get installed, but not very important to update the selection in the custom setup dialog (Sicne in our case most of these dependecies are "invisible" features")...

Using MsiGetFeatureState and MsiSetFeatureState we are able to do this in custom actions, but NOT FOR invisible features. Our install is that of a product suite and has some Core modules (which are visible features) and then some shared files (shared between some but not all core modules).. So the shared files are grouped into "invisible" features (eg A_B for components shared between A and B, A_C for those shared between A and C and so on)... We want these "invisible" features to be excluded by default (installlevel > 100), and add these depending on the core features selected. But like i said, the MsiSetFeatureState fails when trying to set INSTALLSTATE_LOCAL to a an invisible feature...

P-
0 Kudos