We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

R.Mueller
Posts: 202
Joined: Thu Aug 02, 2012 3:31 pm

Howto create dependencies between features?

Hi!

I have some features, lets name them feature A, B, C and D.

What I want need to achieve is, when the user selects feature B or C to be installed, automatically the hidden feature A will also be installed. So I have a dependency between B->A and C->A. If the user selects only feature D, feature A will not be installed.

Any idea how to get it running like this?

R.Mueller
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Howto create dependencies between features?

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

In order to achieve this you can proceed as follows:
- Go to "Dialogs" page and add a new dialog containing three check boxes controls like this:
  • Property Name: CHECK_B
    Value: B
    Text: FeatureB

    Property Name: CHECK_C
    Value: C
    Text: FeatureC

    Property Name: CHECK_D
    Value: D
    Text: FeatureD
- Go to "Organization" page and add the related features (i.e. FeatureA, FeatureB, FeatureC and FeatureD).
- Select FeatureA, from "Feature Properties" right pane enable "Install based on condition" option and set the following condition:
  • NOT ((CHECK_B <> "B") AND (CHECK_C <> "C") AND (CHECK_D = "D"))
- Select FeatureB, from "Feature Properties" right pane enable "Install based on condition" option and set the following condition:
  • CHECK_B = "B"
- Select FeatureC, from "Feature Properties" right pane enable "Install based on condition" option and set the following condition:
  • CHECK_C = "C"
- Select FeatureD, from "Feature Properties" right pane enable "Install based on condition" option and set the following condition:
  • CHECK_D = "D"
- Build and run your project.

Also, in order to use our "Dialog Editor" feature you need at least an "Enterprise" project type.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
R.Mueller
Posts: 202
Joined: Thu Aug 02, 2012 3:31 pm

Re: Howto create dependencies between features?

Hi Daniel,

thanks for your fast answer.

Can I achieve something like this also without an extra dialog? I want the user selecting features from the default customize dialog and add automatically dependent features based on the user's selection.

Btw. How do I enable the CustomizeDlg?

Regards,

R.Mueller
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Howto create dependencies between features?

Hello,
Can I achieve something like this also without an extra dialog? I want the user selecting features from the default customize dialog and add automatically dependent features based on the user's selection.
I'm afraid you cannot achieve this. You should use a custom dialog in order to obtain what you want.
Btw. How do I enable the CustomizeDlg?
If you want to add "CustomizeDlg" dialog to your project go to "Dialogs" page and add "SetupTypeDlg" dialog using [Add Dialog] toolbar button.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
R.Mueller
Posts: 202
Joined: Thu Aug 02, 2012 3:31 pm

Re: Howto create dependencies between features?

But I could use Custom Actions to select/deselect features based on the other features, I am right here?
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Howto create dependencies between features?

Hello,

Yes, you could use a custom action which will set the features actions based on conditions. You can set accordingly the "Session.FeatureRequestState" property in a VB Script custom action.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”