Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

Property Passing in Custom Action

Updated: 30 May 2008 | 3 comments
piyushnasa's picture
0 0 Votes
Login to vote

If you want to pass property or a directory in Custom action then you can use Set Property Custom Action and place it after Cost Finalize. Name the property with the name of the Custom Action you want to pass it to.

Deferred actions do NOT have access to the MSI session objects which means that if you try to get the value of a property set by the installer like:

Val = Session.Property( "Property1" )

in a VBScript custom action which is deferred, it will return null. The original value of Property1 during deferred custom actions is lost.

Here is where CustomActionData comes to the rescue, let's see how this works...

Now create Custom Action with the name defined earlier (Property1):

Call VBScript from embedded code, there you can use the above set property by Session.Property. You can pass more that one property, by set property CA, by separating it with ";" Also while retrieving these values you need to split the variable in you retrieved from Session.Property.

Val=Session.Property("CustomActionData")

Args = Split( Val, ";" )
Value1 = Args(0)
Value2= Args(1)

If you are running this CA in Immediate Execution then you need to directly pass the property name.

Comments

R-Vijay's picture
02
Jun
2008
0 Votes 0
Login to vote

Need Info..

Good Information to start with.
Lets have few more posts on Custom Actions and Impersonation.

Microsoft MVP [Setup-Deploy]
Weblog: www.msigeek.com

rbrucelee1978's picture
19
Mar
2009
0 Votes 0
Login to vote
rbrucelee1978's picture
19
Mar
2009
0 Votes 0
Login to vote

Impersonation

If you guys wanted to talk about impersonation, write a blog on the Installation Sequences.