/build/static/layout/Breadcrumb_cap_w.png

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

0 Comments   [ + ] Show comments

Answers (9)

Posted by: anonymous_9363 16 years ago
Red Belt
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.
Posted by: aogilmor 16 years ago
9th Degree Black Belt
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.
Posted by: HotSpot 16 years ago
Orange Senior Belt
0
Thanks guys, much appreciated! i will give it a whirl...
Posted by: jmcfadyen 16 years ago
5th Degree Black Belt
0
you can retrieve a similar result running Immediate actions after InstallFinalize as well probably a little less appropriate but does the required job.
Posted by: HotSpot 16 years ago
Orange Senior Belt
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!
Posted by: jmcfadyen 16 years ago
5th Degree Black Belt
0
try using session.property to set your properties during deferred.
Posted by: AngelD 16 years ago
Red Belt
0
For vbscript that would be:
session.property("MyProperty") = "my value"
Posted by: anonymous_9363 16 years ago
Red Belt
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.
Posted by: HotSpot 16 years ago
Orange Senior Belt
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!
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
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