cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Mayank23
Level 4

Feature specific Custom Actions

How can I associate CA with features.I mean different CAs for different features which the user wants to install.

My case : I have two different vbscripts and each one is for a different feature. :confused:
Labels (1)
0 Kudos
(7) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

If you look up "Conditional Statement Syntax" you'll find some notations that let you set a condition per a feature's install or action state. The other approach would be to query the feature states from within your custom action; read up on the Session object for more on that direction. I'm not sure which approach would be better, but I'm not a fan of VB Script custom actions either way.
0 Kudos
knoepdan
Level 6

maybe these examples help you (no warranty):

Try this if you only want it to run when a feature named Database feature is installed (or being installed):

&Database=3 OR !Database=3


If a feature is selected for installation:
&feature_name=3
This will be true if the feature_name is selected for installation.

If a feature is not selected for installation:
NOT &feature_name=3

The feature is already installed:
!feature_name=3
0 Kudos
Mayank23
Level 4

Hi Knoepdan and MichaelU,
I have tried and it seems to work.
But only problem is :It does not jump to next CA as CA of my vbscript couldn't execute because of the condition I put.
It should skip my conditional CA altogether.How to do that?
Is it some how related to return processing?
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

If a condition for an action evaluates to false, the action is completely skipped, so its return processing doesn't enter into this. As usual, inspecting a verbose log and considering what the running actions do is about your best bet for resolving this.
0 Kudos
diptisaraf
Level 3

Hi Michael,

I have tried this with Chained msi package.
It is working properly.
that is the msi package will launched based on the feature selection

Thank you very much for the solution.:)

But, Can you tell me why it is compered with the value 3?

Hope it works in all the cases(good/bad). 🙂
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

@diptisaraf, why what is compared to the value 3? Assuming you mean the condition clause like &featurename = 3, check out the help topic on Conditional Statement Syntax.
0 Kudos
diptisaraf
Level 3

Hi,

I have 2 msi packages.. and want to call msi package based on 1 feature using chained msi.
Fresh installation is working fine. But, reinstall/upgrade/modify is not working.
I hace tried lot of options...but of no use....

plz help me in resolving this.
0 Kudos