Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Help on Custom action execution.


4 replies to this topic

balaji4u

balaji4u
  • Full Members
  • 74 posts

Posted 16 June 2011 - 10:39

Hi ,

I am facing a problem while executing custom actions.

I listed four features in the custom dialog and two of these features are associated with custom actions.

-> Feature A: If the user selects this feature in the feature tree a third party installer is launched which will install a different product.

->Feature B: If the user selects this feature , a dialog is displayed which asks for the destination path where this feature has to be installed.

Now when the user selects both these features only one of these custom actions are triggered , however when the user selects any one of them the corresponding action is triggered. But when the user selects both the features how do i make both custom actions to be triggered , that custom action 2 has to be triggered after action 1. How can i achieve this. Please help me in this regard.

Thanks
Balaji



Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 16 June 2011 - 15:29

When do you kick of the third party installer for Feature A? Immediately or do you schedule it to be run after your main install?

The general approach you would use for this would be to use two properties, for example FEATURE_A and FEATURE_B. You could set them to 0 initially, and you could change the value to 1 if the user selects the feature. Then you could run the third party setup during or after your main install with a custom action conditioned to run or not depending on the user selection.

If Feature B is something you install yourself (i.e not third party) you could manipulate the LEVEL value for the feature to enable it to install or not depending on user selection. This involves setting the LEVEL value less than or equal to the INSTALLLEVEL value for the setup as a whole. See the MSI SDK for more details. with regards to setting the destination you should set the destination path to a property which you then set via the dialog. For example MYUSERDATABASEDIR. All components for the feature should then use this directory as its base directory.

Edited by Glytzhkof, 16 June 2011 - 15:30.

Regards
-Stein Åsmul

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 21 June 2011 - 11:41

How do you trigger these custom actions? Are they ion a sequence or are you doing DoAction from a dialog? What are the conditions on these actions?

balaji4u

balaji4u
  • Full Members
  • 74 posts

Posted 21 June 2011 - 12:39

Hi,

Thanks for your answers , i have found a solution for this. My earlier mistake was i was doing both the custom actions using the Doaction from a pushbutton , now i have added them in execute sequence and this will be triggered based on the feature selected. I am using the condition &FeatureName = 3 to check if the user has selected the feature , so far i havent faced any problems and its working fine.

Regards,
Balaji

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 21 June 2011 - 18:21

As you probably know you should never invoke anything that changes the system from the GUI using DoAction. The entire user interface sequence is skipped when the install is run in silent mode, and then none of the actions invoked from the GUI will run.
Regards
-Stein Åsmul