/bundles/itninjaweb/img/Breadcrumb_cap_w.png

Hi all,

It's been a while.  Hope all had a great Holiday Season.

So, I have an immediate custom action, which runs from a UI button click and grabs a value from an XML file and sets a PUBLIC property to that value.  I then want to run a custom action condition to run if the PUBLIC property has been populated or has a value  and also pass the property to the widget as a parameter.  Do I have to add this property to SecureCustomProperties?

The install runs elevated requiring Admin rights.

If I do have to add it to SecureCustomProperties, do I have to seed the PUBLIC property in the Property table (I will not set a value) or can I just add the Property name to SCP?

Any help appreciated.

I'm thinking I have to add to Property table, add to SCP, and then things will work.

Over the years I am often confused with using SCP or CustomActionData.  I think in all the years I've been tasked with creating installs, I've only used CustomActionData a few times.  The majority of install tasks just work or seem to work if added to SCP.

Thanks for any clarification, tips, etc.

0 Comments   [ - ] Hide Comments

Comments

  • This content is currently hidden from public view.
    Reason: Removed by member request
    For more information, visit our FAQ's.
Please log in to comment

Community Chosen Answer


Answers

1
The last sentence of the first paragraph of this article should answer your question.

To pass properties to the deferred sequence, you need to use CustomActionData.
Answered 01/10/2018 by: VBScab
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity

Answers

0
In general, it's not mandatory to add your runtime property to SecureCustomProperties and to Property table. If you set your public property in the Immediate block, it must also be accessible in the Deferred block.
Answered 01/10/2018 by: pace-support
Fifth Degree Brown Belt

Please log in to comment
0
pace-support, That gets to the basic question, do I need CustomActionData? What I've found in the past is if I add a control to a dialog and assign a property to it (public, ALLCAPS), InstallShield automatically adds it to SecureCustomProperties. So, it is set in the immediate block, but I did not use CustomActionData and it is available to my custom actions in the Deferred block.
Answered 01/10/2018 by: Superfreak3
Second Degree Black Belt

Please log in to comment
0

So here is the funny thing.  I added the set of public properties in an immediate execute custom action .dll.  The widget grabs some xml values and sets the properties.

Then all I did was add the custom action which will consume this information (deferred in System context) as passed on the command line.  I didn't have to use CustomActionData or add the properties to SecureCustomProperties and everything works.  I wonder if they are automatically added to SecureCustomProperties when they are populated by the .dll at runtime.  I guess I could write an action to display SecurCustomProperties or I can just take it as it is because it works!!

Answered 01/15/2018 by: Superfreak3
Second Degree Black Belt

Please log in to comment
0
This has troubled me. Not enough to set anything up as an experiment, you understand - too busy doing actual work, at the moment! - but enough to cogitate a little.

I *think* the distinction here is that the CA won't be able to access these property values *inside itself*. What I mean by that is, a CA that does something like, say, run an executable with a property value passed on the command line would work. But a CA which has an internal function that then tries to access the same value wouldn't work.
Answered 01/16/2018 by: VBScab
Red Belt

Please log in to comment
0

Ah, that could be the difference.  I've always had trouble understanding PROPERTY access in the deferred sequence.  There have been times, although very few (once or twice) over the years where it seemed I had to use CustomActionData.  Other times, adding to SecureCustomProperties seemed to do the trick.  And, like now, I utilized neither and all seems to work.

I can't remember the circumstances for having to use CustomActionData, but I wish I had jotted them down at the time.  I hear you about experimentation - I'm flying 90000 miles/hour most of the time with not time to slow down.  Hopefully, I or someone can find the time to mock something up explaining the difference between those methods.

Answered 01/16/2018 by: Superfreak3
Second Degree Black Belt

Please log in to comment