Retrieving Windows Installer Values in Deferred Custom actions?
Anyone know how i can retrieve properties set by windows installer from custom actions set in Execute Immediate in custom action run in Execute deferred.. I know i've read somewhere that deferred custom actions run in a separate process so i was wondering if anyone had any neat tricks to bypass this problem....
Thanks in advance!
Paul
BTW im using Wise Installation studio
Thanks in advance!
Paul
BTW im using Wise Installation studio
0 Comments
[ + ] Show comments
Answers (9)
Please log in to answer
Posted by:
anonymous_9363
16 years ago
You need to create (what I call) a companion CA in Execute Immediate whose name matches that of the Execute Deferred CA. Then, in your Execute Deferred CA, reference the property CustomActionData: Session.Property("CustomActionData").
WPS's Help does a resonable job of explaining this but I found this and this
BTW, as the above implies, you can only pass one property to the same CA. What if you need to pass, say, a bunch of arguments to a function in a script? Easy: divide up your property's values with a delimiter (I use '|') and then parse the data within your script. In VBScript, you'd use Split, for example.
WPS's Help does a resonable job of explaining this but I found this and this
BTW, as the above implies, you can only pass one property to the same CA. What if you need to pass, say, a bunch of arguments to a function in a script? Easy: divide up your property's values with a delimiter (I use '|') and then parse the data within your script. In VBScript, you'd use Split, for example.
Posted by:
aogilmor
16 years ago
See the bottom section of this page for a description of how to pass properties to deferred custom actions. VBscab is describing the same thing I'm pretty sure.
Posted by:
jmcfadyen
16 years ago
Posted by:
HotSpot
16 years ago
...Now that i've got the passing of properties from immediate to deferred working, does anyone know how i can pass installer properties in deferred to immediate?
I have tried to create a deferred action that writes properties to a file and pick up the properties from immediate (before install finalize) to no avail!
Basically, I am trying to detect a failure (in deferred) depending on return code to terminate the installation or to request a reboot, i know installer properties cant be set in deferred so any advice would be great!
Regards
Paul
PS. this must happen before install finalize!
I have tried to create a deferred action that writes properties to a file and pick up the properties from immediate (before install finalize) to no avail!
Basically, I am trying to detect a failure (in deferred) depending on return code to terminate the installation or to request a reboot, i know installer properties cant be set in deferred so any advice would be great!
Regards
Paul
PS. this must happen before install finalize!
Posted by:
jmcfadyen
16 years ago
Posted by:
AngelD
16 years ago
Posted by:
anonymous_9363
16 years ago
HS, if you do a spot of reading on EI and ED CAs, you'll appreciate that what you're trying to do (pass a property back to EI) is impossible. You need to re-think the route to achieve what you want. Off teh top of my head, I guess you could add a CA after InstallFinalize in ED which tests for failure and then branches accordingly.
Posted by:
HotSpot
16 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.