Loading
Problem with feature dependencies
Hello,

 

i have a installscript installation. Let me describe my problem:

 

Let's say i have two features, A and B.

 

A needs B, but B dont need A.

 

If i select A in the custom installation, then B is selected too. Thats fine. But if i deselect A, B is still selected.

 

I dont want that. If i deselect A then B should be deselected too. How can i do that?

  • 0_Alpesh (Flexera Software)

    Oops, I overlooked that it was a pure InstallScript project.

     

    Anyways, you will have to handle that in the InstallScript code. Use the FeatureSelectItem and FeatureIsItemSelected functions to implement the feature dependency you want. I believe you will have to put this code in the SdFeatureTree dialog code.

     

    I hope this helps.

     

    Thanks!
    Expand Post
  • I tried it on a Test Project, but it wont work:

     

    Dlg_SdFeatureTree:

     

    if ((nResult = BACK) && (nSetupType != CUSTOM)) goto Dlg_SdAskDestPath2;

     

    szTitle = "";

     

    szMsg = "";

     

    szFeatures = "";

     

    nLevel = 2;

     

    if (nSetupType = CUSTOM) then

     

    //{{IS_SCRIPT_TAG(Dlg_SdFeatureTree)

     

    nResult = SdFeatureTree( szTitle, szMsg, TARGETDIR, szFeatures, nLevel );

     

    //}}IS_SCRIPT_TAG(Dlg_SdFeatureTree)

     

    if (nResult = BACK) goto Dlg_SdAskDestPath2;

     

    endif;

     

     

    FEATURE = FeatureIsItemSelected (MEDIA, "Test\\Test2");

     

    if (FEATURE = 0) then

     

    FeatureSelectItem (MEDIA, "Test\\Test1", FALSE);

     

    endif;

     

    I want that if the SubFeature Test2 isnt selected it should deselect the SubFeature Test1. Whats wrong with this last four lines?
    Expand Post
  • 0_Alpesh (Flexera Software)

    Hi,

     

    You will have to import the InstallScript .rul file for the SdFeatureTree dialog. And then make your changes there. Look into the InstallShield help article 'Import InstallScript Files Dialog Box'.

     

    Thanks!
    Expand Post

Loading
Problem with feature dependencies