How to change Featurepropertys at runtime? - Advanced Installer Community

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!

Hale
Posts: 4
Joined: Thu Oct 11, 2012 11:54 am

How to change Featurepropertys at runtime?

Hello,

my project has 3 Features(1 Mainfeature, 2 Childfeatures)
The Main- and 1st Childfeature have the property "Always install this Feature. ..." checked.

There is a special case for the 2nd childfeature because it can be installed by an own setup. So I want to check if some of these files are located in my APPDIR.
If there are no files I want to check the property "Always install this Feature. ..." too. So that the user can't uncheck this Feature during custom installation.

The question is:
How can I check the (currently selected) APPDIR for those files and eventually change the "Always install this Feature. ..." during runtime?

Regards
Michael
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: How to change Featurepropertys at runtime?

Hello Michael,

In order to achieve what you want you can proceed like this:
- Go to "Search" page and add a file search (MY_SEARCH).
- Go to "Dialogs" page and create a custom feature selection dialog (i.e. using check boxes).
- Select the related check box controls and in the "Properties" right pane set the following fields like this:
  • Default Value: checked
    Enabled: False
- Select the check box control (i.e. MY_CHECKBOX) of the second Childfeature and add two control conditions like this:
  • Condition: MY_SEARCH
    Action: Enable

    Condition: (NOT MY_SEARCH)
    Action: Disable
- Go to "Organization" page, select the second Childfeature, enable "Install based on condition" option from "Feature Properties" right pane and use the following condition:
  • Condition: MY_CHECKBOX
- Build and run your project.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Hale
Posts: 4
Joined: Thu Oct 11, 2012 11:54 am

Re: How to change Featurepropertys at runtime?

Hi Daniel,

yes it helped a bit but there is still anoter probleme I have to solve.

In my CustomizeDlg I'm using a QuickSelectionTree and the text property is: "Control.Text.CustomizeDlg#CustomizeDlgQuickSelectionTree_1".

It is filled automatically, so i don't really know how to disable/enable only one of the items.

I hope u can help me again.

Greets,
Michael
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: How to change Featurepropertys at runtime?

Hello Michael,

I'm afraid you cannot achieve what you want using a "Quick Selection Tree" control. You should control your features state using check boxes or radio buttons controls using a similar solution like the one from my previous post.

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

Return to “Common Problems”