Features organization -> difficult combinations - 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!

Laurin
Posts: 58
Joined: Thu Jun 12, 2008 4:27 pm

Features organization -> difficult combinations

Hi guys,

I have some difficult feature organization.
Assume i have the following:

* Common Components (the components used by the hole package - i set it as install always!)
* Outlook AddIn (The add-in for microsoft outlook. If outlook is installed or not is defined in the Property OUTLOOK)
* Word AddIn (The add-in for microsoft word. If word is installed or not is defined in the property WORD)

So there are some difficult dependencies:

* If OUTLOOK or WORD is not installed the corresponding feature should not be displayed in the customizetypedlg
* If OUTLOOK and WORD are unselected "do not install" then the user should not be abled to continue in the customizetypedlg, because only the common components would be installed, but that makes no sense in regard that no add-in should be installed.

Can you please help me. It seems like advanced installer does not support such complex cases. But till yet everything worked fine...

any help would be really appreciated. :-)

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

Re: Features organization -> difficult combinations

Hi,
If OUTLOOK or WORD is not installed the corresponding feature should not be displayed in the customizetypedlg
There is a similar discussion on the forum, please take a look:
http://www.advancedinstaller.com/forums ... f=2&t=1162
If OUTLOOK and WORD are unselected "do not install" then the user should not be abled to continue in the customizetypedlg, because only the common components would be installed, but that makes no sense in regard that no add-in should be installed.
This can be done by using the feature action of the two features as a condition for the "NewDialog" control event of the "Next" button. Here are the steps:
- go to the Dialogs page and select the "CustomizeDlg" dialog
- select the "Next" button and go to the Published Events tab of the "Control" section
- edit the condition of the "NewDialog" control event by adding the feature actions of the two features

For example, if the features have the Identifiers "Outlook" and "Word", the condition would look like this:

Code: Select all

((NOT Installed) OR (InstallMode = "Change")) AND (&Outlook=3 OR &Word=3)
This will make the package show the next dialog only if at least one of the two features is set to be installed.

In order to inform the user about this limitation, you can use a ScriptInline UI custom action:
- go to the Custom Actions page and create a ScriptInline custom action under "UI Custom Actions"
- set the "Script Text" field to :

Code: Select all

MsgBox "You must select at least one feature"
- go to the "Dialogs" page and select the "Next" button on "CustomizeDlg"
- create this published event:

Code: Select all

DoAction          ScriptInline           (&Outlook<>3 AND &Word<>3)
where "ScriptInline" is the custom action which shows the message box.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Laurin
Posts: 58
Joined: Thu Jun 12, 2008 4:27 pm

Re: Features organization -> difficult combinations

Thank you. Everything works great with your very detailed explanation.

Return to “Common Problems”