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.
Answers (6)
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!!
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.