codesynergy
Posts: 100
Joined: Fri Nov 14, 2014 10:29 pm

Feature Conditions and Enhanced UI

Hello,

I’m giving the Enhanced UI an honest try (reference:http://www.advancedinstaller.com/forums ... hp?t=34215). This is the first issue I’m running into:

I have the following features. Please take note of the “Installation Behavior” fields:
Features.PNG
Features.PNG (18.6 KiB) Viewed 3372 times
When clicking the “Next” button on the “WelcomeDlg”, I execute a custom action with the following code:

Code: Select all

CustomActions.m_Session["B_INSTALL_FEATURE"] = "-1";

//CostFinalize must be called to re-evaulate feature conditions.
CustomActions.m_Session.DoAction("CostFinalize");
This results in the following:
Features2.png
Features2.png (3.69 KiB) Viewed 3372 times
You can see that “Disabled_Set_Property” is still visible, but it shouldn’t be. Now, it does seem to be disabled, since you cannot change the state:
Features3.png
Features3.png (5.57 KiB) Viewed 3372 times
But, it should be completely hidden. Notice that “Disabled” and “Disabled_Hardcoded_Property” are hidden.

So, my question is, why is “Disabled_Set_Property” not hidden, and what do I need to do to make it hidden? It’s worth noting that it is hidden if I don’t use the Enhanced UI (AI 13.4).

I’m guessing it has something to do with the sequencing of the actions. When I originally wrote this code, I found that I had to re-call CostFinalize after setting properties associated with feature conditions, as it seems to cause the installer to re-evaluate the feature conditions. I’m not sure if this was the proper way to do it, but it did work with the standard UI.

The fact that “Disabled_Hardcoded_Property” is hidden means moving the custom action (to set the property) to an earlier point (before the dialogs) would probably resolve the problem. However, this is not an option for me, as the property is set based on input from the user (product key).

Any ideas?


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

Re: Feature Conditions and Enhanced UI

Hello,

Unfortunately this is indeed an Advanced Installer issue caused by our "Enhanced User Interface" feature. A fix will be available in a future version of Advanced Installer, thank you for bringing it to our attention. We will update this thread as soon as the fix will be out.

Until then, I'm afraid there is no workaround. We apologize for the inconvenience.

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

Return to “Common Problems”