/bundles/itninjaweb/img/Breadcrumb_cap_w.png
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
0 Comments   [ - ] Hide Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity

Answers

0
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.
Answered 07/05/2007 by: VBScab
Red Belt

Please log in to comment
0
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.
Answered 07/05/2007 by: aogilmor
Ninth Degree Black Belt

Please log in to comment
0
Thanks guys, much appreciated! i will give it a whirl...
Answered 07/06/2007 by: HotSpot
Orange Senior Belt

Please log in to comment
0
you can retrieve a similar result running Immediate actions after InstallFinalize as well probably a little less appropriate but does the required job.
Answered 07/09/2007 by: jmcfadyen
Fifth Degree Black Belt

Please log in to comment
0
...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!
Answered 07/11/2007 by: HotSpot
Orange Senior Belt

Please log in to comment
0
try using session.property to set your properties during deferred.
Answered 07/11/2007 by: jmcfadyen
Fifth Degree Black Belt

Please log in to comment
0
For vbscript that would be:
session.property("MyProperty") = "my value"
Answered 07/11/2007 by: AngelD
Red Belt

Please log in to comment
0
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.
Answered 07/12/2007 by: VBScab
Red Belt

Please log in to comment
0
You're right VBS,, I realise that the ED CAs are read but not executed until all actions before finalize in EI have been executed... damn it..

I will have to rethink this one carefully.

Thanks all!
Answered 07/13/2007 by: HotSpot
Orange Senior Belt

Please log in to comment