Emmanuel Derriey
Posts: 16
Joined: Tue Sep 03, 2013 3:28 pm

Public property/feature install based on condition issue

Hi,

I encounter an issue I was unable to solve by myself.

I made a installation package.
I added a public property, checked as persistent.
In dialogs sequence, I added my own dialog with 3 choices (radio buttons) mapped on this property. This dialog is between License Agreement and Setup Type dialogs.
Then, I have 2 features and I indicated for each of them that Install is based on condition : MY_PROP = "1" for the first feature, MY_PROP = "2" for the second (the third choice is "none").

I run install: the choice I make on my own dialog is well took to install right feature: great.
But, if I click to "Custom setup" button, the features are not "checked" or "unchecked" depending the property. It seems not to be updated when property is changing?

In the same way, if I launch a new installation package (on existing one), the radio I checked is well re-checked (thanks to persistent); the custom setup has the right checked/unchecked features. I click back, I change my property, then Next, custom setup: features are checked/unchecked like before. No update in this case too.

Is there a way to solve this problem?

Thanks a lot for your answer.

Regards,

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

Re: Public property/feature install based on condition issue

Hello Manu,

Indeed, this is our default behavior for this scenario. However, in order to achieve what you want you can use our predefined "Updates Features Install States" custom action. Here's the steps to proceed:
- go to "Custom Actions" page and add an "Updates Features Install States" custom action without sequence
- go to "Dialogs" page, select your "own dialog with 3 choices" and on [Next>] button add a publised event like this:
  • Control Event: Execute custom action
    Argument: UpdatesFeaturesInstallStates
    Condition:
- build and run your project

If you have any questions let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Emmanuel Derriey
Posts: 16
Joined: Tue Sep 03, 2013 3:28 pm

Re: Public property/feature install based on condition issue

Perfect, it works properly.

Thanks a lot for your quick reply!

Best regards,

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

Re: Public property/feature install based on condition issue

You're welcome.

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

Return to “Common Problems”