Zsolt Kollarits
Posts: 342
Joined: Fri May 29, 2015 10:36 am

File is missing after installation

Dear Advanced Installer Support Team,

We need to install a file conditionally, but no matter our condition looks fine, our file is never installed.

We have the following component structure at Organization tab:


-> Feature A
-> Feature "TheExchangeServer"
-> Component "ExchangeServer.Conf.GUI.dll"

-> Feature B
-> Feature "TheDesigner"
-> Feature "TheExchangeAdmin"
-> Component "ExchangeServer.Conf.GUI.dll" (duplicate of the .dll above)


-> Feature "Languages"
-> Feature "French"
-> Component "Therefore.Connectors.ExchangeServer.Conf.GUI_FRA.dll"
-> Feature "German"
-> Component "Therefore.Connectors.ExchangeServer.Conf.GUI_DEU.dll"
and so on

As you can see we have the translated version of the "ExchangeServer.Conf.GUI.dll" for sevaral different languages. Our installer should install the relevant language dll if
1. The user select the relevant language feature -> This part works as it should, since the component of the language DLL is under the proper language feature, the language dll is installed only if the language is selected
2. Either TheExchangeServer or TheExchangeAdmin is already installer or being isntalled -> This part is not working for us at all. We wanted to achive this by setting a condition at the Component Properties page/Condition field of each language dll, but none of our conditions were doing the job. We tried to use the following 2 conditions, but none of them worked for us.
a) "(&TheExchangeServer=3 OR !TheExchangeServer=3) OR (&TheExchangeAdmin=3 OR !TheExchangeAdmin=3)"
b) "(&Therefore.Connectors.ExchangeServer.Conf.GUI.dll=3 OR !Therefore.Connectors.ExchangeServer.Conf.GUI.dll=3)"

If we left the Condition field empty, the language dll was installed based on whether the actual language was selected or not.
If we used any of the 2 conditions above, the language dlls was never installed, no matter if we had "TheExchangeServer", "TheExchangeAdmin" + all the language features selected.

Could you please advise us something? I´ll send you our latest .aip file via email.

Best regards,
Zsolt
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: File is missing after installation

Hello Zsolt,

In order to achieve what you want you should simply share the components of the language files under the "TheExchangeServer" and the "TheExchangeAdmin" features too. For instance, you should go to "Organization" page, select the "French" -> "Therefore.Connectors.ExchangeServer.Conf.GUI_FRA.dll" component and while keeping the [SHIFT] key pressed drag and drop it under the "TheExchangeAdmin" feature. Repeat the steps for the "TheExchangeServer" feature too. In this case the related component will be shared by all the above features and it will be installed whenever at least one of its parent feature is installed.

Also, you should delete the current configured condition. Let us know if this helped.

As a side note, please keep in mind that you cannot use a feature/component action statement (i.e. !TheExchangeServer=3) into the "Condition" field of a component or feature. This is a limitation of the Windows Installer design. The installation action (will be installed or not) for features and components is set at install time during "CostFinalize" standard action based on the evaluation of the "Condition" field. But the evaluation of the condition field is processed in a random way. This is why you cannot based on the installation action of another feature for a component not belonging to that feature.

Let us know if this helped, otherwise please give me more details about the behavior you are trying to implement.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Zsolt Kollarits
Posts: 342
Joined: Fri May 29, 2015 10:36 am

Re: File is missing after installation

Hi Daniel,

The solution proposal you have written down is slightly different from what we´d like to achive. As far as I understand your letter, we should copy over the language feature like "French" -> "Therefore.Connectors.ExchangeServer.Conf.GUI_FRA.dll" by the SHIFT button into all 3 features:
TheExchangeAdmin
TheExchangeServer
French

We already have some components which were kind of duplicated by the SHIFT button, so we´re aware how this works, but it´s not exactly what we want. If the component would be a part of all 3 features, it´d mean the language DLL would be installed on the PC if any of the features is installed. Instead of this, the DLL should be installed if the user selects the French feature AND, in addition, either TheExchangeAdmin or TheExchangeServer was also selected.

With other words, the following combinations should install the DLL:
French + TheExchangeAdmin
French + TheExchangeServer
French + TheExchangeAdmin + TheExchangeServer


But if French is not selected, the DLL should not appear at all. The following selections should NOT install the DLL:
TheExchangeAdmin
TheExchangeServer
TheExchangeAdmin + TheExchangeServer

Please let me know if you have any other questions.

Best regards,
Zsolt
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: File is missing after installation

Hello Zsolt,

Considering your requirements, the only solution in this case will be to create your own custom feature selection dialog. Then the component should be left added only under the French feature and add a condition on the related component in "Organization" page using the properties of the UI controls (e.g. checkboxes) associated with your features.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Zsolt Kollarits
Posts: 342
Joined: Fri May 29, 2015 10:36 am

Re: File is missing after installation

Hi Daniel,

So you´re saying there is no other way to achive our goal but creating our own custom feature selection dialog? Just because of this single feature we´re not keen on increasing the complexity of our .aip project by a lot. We just wanted to ask a proper condition from you, at least we thought our feature installation problem could be solved by playing around with some conditions and that´s all. Are you sure the custom feature selection dialog is the only possible solution?

Thanks in advance,
Zsolt
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: File is missing after installation

Hello Zsolt,

Another workaround solution I can think of will be to move the "Therefore.Connectors.ExchangeServer.Conf.GUI_FRA.dll" component under a separate feature. For instance you could have a feature hierarchy design like this:

-> Feature A
-> Feature "TheExchangeServer"
-> Component "ExchangeServer.Conf.GUI.dll"

-> Feature B
-> Feature "TheDesigner"
-> Feature "TheExchangeAdmin"
-> Component "ExchangeServer.Conf.GUI.dll" (duplicate of the .dll above)


-> Feature "Languages"
-> Feature "French"
----> Feature "FrenchChildFeature"
----> Component "Therefore.Connectors.ExchangeServer.Conf.GUI_FRA.dll" - without any condition set for this component

Then you can use the "Install one or more features locally - AddLocal" and the "Uninstall one or more features - Remove" control events on your dialogs to mark for install or not the "FrenchChildFeature" based on the installation action of the feature you mentioned.

For instance, you can go to "Dialogs" page, go to "CustomizeDlg" dialog and on its [Next>] button add two published events like this:
  • Control Event: Install one or more features locally - AddLocal
    Argument: FrenchChildFeature
    Condition: (&French = 3 AND &TheExchangeAdmin = 3) OR (&French = 3 AND &TheExchangeServer = 3)

    Control Event: Uninstall one or more features - Remove
    Argument: FrenchChildFeature
    Condition: NOT ((&French = 3 AND &TheExchangeAdmin = 3) OR (&French = 3 AND &TheExchangeServer = 3))
Let me know if this helped.

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

Return to “Common Problems”