cancel
Showing results for 
Search instead for 
Did you mean: 
Superfreak3
Occasional contributor

Can I Pass Feature State (&Feature1 or !Feature1) As Command Line Args to .exe CA?

I have a small widget that updates the Add Remove Programs display based on what features are installed. I pass in the [ProductCode] and tried passing in &Feature1 !Feature1 &Feature2 !Feature2, but all I get is the actual text there, not the numerical value.

If I use ADDLOCAL that will only show Features Added during a maintenance install and that won't due because features already installed aren't present there.

Any Help appreciated!
Labels (1)
0 Kudos
1 Reply
enanrum
Pilgrim

Re: Can I Pass Feature State (&Feature1 or !Feature1) As Command Line Args to .exe CA?

How many different icons can you have?

Perhaps instead of using the widget, and I have not tried this, but go into the Direct Editor, add all the different icons to the "Icon" table, just copy row and insert and change the values, and use a custom action during install to set the ARPPRODUCTICON property to one of you defined icons in the table.

See how the installer does it now using the Icon table and ARPPRODUCTICON.exe from that table.

Then you can condition have multiple SetProperty custom actions with your feature states as the condition.
like

SetPropertyIconOne
Property Name = ARPPRODUCTICON
Property value = "Icon1.exe" (From icon tables name Field)
condition = &Feature1

Again - I'm not sure if that will work but let us know. Interesting concept.
If that doesn't work then depending on what need to pass to your widget - use a Set Property custom action as above and use that property name for your widget.

SetPropertyFeature1
Property Name = WIDGETARGUMENT
Property value = "FeatureOneIcon"
condition = &Feature1

SetPropertyFeature2
Property Name = WIDGETARGUMENT
Property value = "FeatureTwoIcon"
condition = &Feature2

CA to run the widget:

runWidget [WIDGETARGUMENT]
0 Kudos