6.1.1 : conditional custom dialog based on feature - 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!

Alpicus
Posts: 108
Joined: Sat Feb 16, 2008 5:29 pm
Location: Switzerland
Contact: Website

6.1.1 : conditional custom dialog based on feature

Hi,

I have 1 feature which can be included in a build or not and depending if the feature is installed or not I want to display a custom dialog or the VerifyReadyDlg. For this, in Published event of "Next" button I have :

newdialog | VerifyReadyDlg | AI_INSTALL AND &myfeature = 2
newdialog | MyCustomDlg | AI_INSTALL AND &myfeature = 3

This seems not working. Is there a solution ?

Thanks,

Phil
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

I'm not sure I understand what you mean. Do you need to not install a feature if it is already installed?

Note that the Feature conditions (stored in the "Condition" table inside the MSI database) are processed during the "CostFinalize" action. After this stage (during the UI for example), any changes in the conditional expression evaluation do not affect the InstallLevel of the Features.

However, if you need to conditionally install a feature, you can use a custom action. There is a discussion about this on the forum:
http://www.advancedinstaller.com/forums ... php?t=1162

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Alpicus
Posts: 108
Joined: Sat Feb 16, 2008 5:29 pm
Location: Switzerland
Contact: Website

Hi Cosmin,

In Organization setion, you can decide to include or not a feature in a specific build. If I include the feature in the build A, I need to display a custom dialog but if I don't include the fetaure in the build B, I don't have to display the custom dialog.

Hope my explanation is better.

Cheers,

Phil
cosmin wrote:Hi,

I'm not sure I understand what you mean. Do you need to not install a feature if it is already installed?

Note that the Feature conditions (stored in the "Condition" table inside the MSI database) are processed during the "CostFinalize" action. After this stage (during the UI for example), any changes in the conditional expression evaluation do not affect the InstallLevel of the Features.

However, if you need to conditionally install a feature, you can use a custom action. There is a discussion about this on the forum:
http://www.advancedinstaller.com/forums ... php?t=1162

Regards,
Cosmin
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

I'm afraid that this is not supported by Advanced Installer. The dialogs in the "Dialogs" page are included in all builds and you cannot condition them based on the build.

The only solution for this is to create a separate project for the build which includes the dialog you want.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Alpicus
Posts: 108
Joined: Sat Feb 16, 2008 5:29 pm
Location: Switzerland
Contact: Website

Thanks for ur fast answer !
Alpicus
Posts: 108
Joined: Sat Feb 16, 2008 5:29 pm
Location: Switzerland
Contact: Website

Another request :

How to deal with the condition to hide or not depending if a feature is in a build or not :

I tried these without success in the control condition :
!myfeature = 2 | Hide
&myfeature = 2 | Hide

Thanks for ur future answer !

Phil
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

In Advanced Installer you cannot condition something based on a build. However, you can condition something based on the installation of a feature:
- &Feature=3 (True if the feature will be installed by the package)
- !Feature=2 (True if the feature is not already installed when the package runs)
- &Feature=2 (True if the feature will be removed by the package which is currently running)

Note that these conditions work only if the feature used by them is included in the package.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Alpicus
Posts: 108
Joined: Sat Feb 16, 2008 5:29 pm
Location: Switzerland
Contact: Website

I was afraid about this answer.

Thanks.
cosmin wrote:Hi,

In Advanced Installer you cannot condition something based on a build. However, you can condition something based on the installation of a feature:
- &Feature=3 (True if the feature will be installed by the package)
- !Feature=2 (True if the feature is not already installed when the package runs)
- &Feature=2 (True if the feature will be removed by the package which is currently running)

Note that these conditions work only if the feature used by them is included in the package.

Regards,
Cosmin

Return to “Common Problems”