/build/static/layout/Breadcrumb_cap_w.png

Accessing Custom Action Data

Hi all,

Here's what I'm doing to pass a Public Property value into the Deferred Sequence....

Create a Set Directory Custom Action...
Name: InfoPasser
Property: NEEDEDINFO (the name of another Custom Action that accesses the information)
Property Value: SOMEINFO (property holding the information that needs to be passed)

I know I can then create a custom action named NEEDEDINFO and access CustomActionData, for example, by vbscript using Session.Property("CustomActionData").

What I was actually hoping to do is to create the NEEDEDINFO Custom Action to fire an .exe. I was then thinking I would be able to pass [CustomActionData] as one of the parameters to the .exe, but that doesn't appear to work. Is that truly the case that I can't do that? Or, am I doing something wrong.

Any information is appreciated!

Thanks!

0 Comments   [ + ] Show comments

Answers (3)

Posted by: Superfreak3 14 years ago
2nd Degree Black Belt
0
It appears that instead of passing [CustomActionData] to the .exe, if I pass [NEEDEDINFO] as the command line parameter it works.

Good thing I only really have to pass one thing to Custom Action Data right now so there's no parsing needed at this time.
Posted by: Superfreak3 14 years ago
2nd Degree Black Belt
0
What's the real difference between using SecureCustomProperties and CustomActionData.

It seems now that if I add the desired property, the value of which I was passing to CustomActionData, to SecureCustomProperties, my action works fine.

I don't know if I should keep my functioning pass to CustomActionData in place or switch to SecureCustomProperties. I have another Custom Action that calls an .exe and the parameters that are pased to it are property values listed in SecureCustomProperties.

I guess I'll stay consistent and add this new property to SecureCustomProperties.

I don't really understand the difference between CAD and SCP's.
Posted by: jmcfadyen 14 years ago
5th Degree Black Belt
0
stay with CustomActionData.

You should use CustomActionData when you have a custom action that is required to write to the system in some way.

If the custom action needs to write to the system it MUST be deferred. In addition to that if you also require data from the MSI then you need to use CustomActionData to pass the data from the immediate phase through to the deferred phase.

You can pass multiple values or whole tables to the deferred phase. In an ideal situation your exe or dll should make the calls to get CustomActionData then call the respective tasks required.

In a worst case scenario you could call the exe from a vbs custom action such as

strCustomActionDataValue = session.property("CustomActionData")

objShell.run "blah.exe " & strCustomActionDataValue

not ideal but it will achieve the results you need.

if you need to pass an entire table you will need these

session.database and

session.database.openview
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