/build/static/layout/Breadcrumb_cap_w.png

Can I Pass Feature State (&FeatName or !FeatName) As Command Line Arguments to and .exe Custom Action...

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!


7 Comments   [ + ] Show comments
  • Is this any use for you?

    http://msdn.microsoft.com/en-us/library/aa371662%28v=vs.85%29.aspx - anonymous_9363 10 years ago
  • Ah, that is nice. However, I'm not sure that information will be available in the execute sequence, will it? I wonder if I can use that in an .msi dll in the execute sequence. ??

    Again, thanks for that! - Superfreak3 10 years ago
  • You must mean the Deferred sequence. No, it won't so pass it in the special CustomActionData property.

    You could construct a character-separated string e.g Feature1=3, Feature2=0, Feature3=3 and so on, then simply parse the content in whatever technology - presumably script - you're using in the Deferred CA. - anonymous_9363 10 years ago
  • I was trying to use session.item in a vb MSI dll, but I guess you can't use session. in deferred mode. I just started tackling this again so more trial and many errors to come. - Superfreak3 10 years ago
  • The link you provided above did help in getting me to populating a PROPERTY based on feature install/action states. What I have is something that builds a PROPERTY value like FeatureName1;FeatureName2 etc.

    What I would like to do to this is pass it into CustomActionData as...

    [ProductCode];[PROPERTY].

    Then, I am parsing/splitting on ";" so I get the Product Code GUID and each Feature selected for installation or already installed as elements of an array.

    I take the ProductCode and scramble it to get to the Add/Remove Programs DisplayName.

    What I'm trying to do at this point is adjust the DisplayName value based on the remaining elements of the split. The request is for me to display, in ARP, what is actually installed as part of an overall suite.

    So, if PROPERTY contained FeatureName1 and FeatureName2, the resulting DisplayName would be something like Our App FeatureName1 and FeatureName2.

    My problem is getting the values I need to CustomActionData then grabbing that for parsing during the Deferred Sequence.

    I think the problem is that I am using Session.Item in an MSI .dll to get at the property in the later sequence and that is a no-no. So, how else can I do it? - Superfreak3 10 years ago
  • Can I get at CustomActionData with a deferred .exe custom action? - Superfreak3 10 years ago
  • Here's what I got to work. In immediate sequence I fire an msi .dll that gets the feature states and sets a PROPERTY with names of those set to install (or already installed and not marked for removal during maintenance) separated with ";".

    Then I use an .exe Custom Action in deferred sequence where I can successfully use [ProductCode];"[PROPERTY] as arguments which are parsed and the ARP verbiage is set accordingly.

    I did name this deferred custom action using all caps as instructed in various CustomActionData references. I don't know if there is anything else I should be doing, but all appears to work as desired. I have not tried to see if it works while using a deferred action named normally (not all caps).

    I guess I should try that. - Superfreak3 10 years ago

Answers (0)

Be the first to answer this question

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ