/build/static/layout/Breadcrumb_cap_w.png

Do I have to add PUBLIC properties to be passed to a deferred custom action as parameters to SecureCustomProperties?

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   [ + ] Show comments

Answers (6)

Posted by: anonymous_9363 6 years ago
Red Belt
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.
Posted by: pace-support 6 years ago
10th Degree Black Belt
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.
Posted by: Superfreak3 6 years ago
2nd Degree Black Belt
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.
Posted by: Superfreak3 6 years ago
2nd Degree Black Belt
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!!

Posted by: anonymous_9363 6 years ago
Red Belt
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.
Posted by: Superfreak3 6 years ago
2nd Degree Black Belt
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.

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