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!
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)
Please log in to answer
Posted by:
Superfreak3
14 years ago
Posted by:
Superfreak3
14 years ago
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.
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
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
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.
so that the conversation will remain readable.