ah34
Posts: 11
Joined: Fri May 19, 2006 4:15 pm

Features and execution conditions in custom actions

Hi,

My application needs to install various office-addins. I do this via custom actions that register/unregister the associated dlls. For each office addin (Word, Outlook, PowerPoint), I have defined one feature.

Now I am not sure that I understand the execution conditions correctly. Each feature has two variables, one that describes its installed state (e.g. !Feature_1) and one that describes whether this feature has been selected for installation by the user (&Feature_1).

Am I on the right track with the following execution conditions?

Installation action:
&Feature_1 AND NOT !Feature_1

Uninstallation action:
!Feature_1 AND NOT &Feature_1 (do I have to add any "REMOVE= ?? " condition ?)

Rollback action:
NOT !Feature_1 AND &Feature_1 (=same as installation action?)


By the way, is there a way to rename the &Feature_x variables into something that corresponds more closely to the feature names? I always have a hard time in figuring out which of my features is meant by a variable such as &Feature_3 (Unfortunately, the feature properties dialog does not list the corresponding variable names; there seems to be no quick way of matching a feature variable used in a condition with the feature it belongs to).

Thanks for your help.

-Alexander
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

I understand that you want to condition the register/unregister custom actions depending on feature selection. Then use following conditions:

Installation action:
((&Feature = 3) AND NOT (!Feature = 3))

Uninstallation action:
((&Feature = 2) AND (!Feature = 3))

Rollback action:
((&Feature = 3) AND NOT (!Feature = 3))
By the way, is there a way to rename the &Feature_x variables into something that corresponds more closely to the feature names?
Currently you can change the feature title but in a future version we will allow to change the name also. We already have this on our TODO list. Thank you for your suggestion.

Regards,
Gigi
________________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”