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
Answers (0)
Please log in to answer
Be the first to answer this question
http://msdn.microsoft.com/en-us/library/aa371662%28v=vs.85%29.aspx - anonymous_9363 10 years ago
Again, thanks for that! - Superfreak3 10 years ago
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
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
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