cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
davem1958
Level 2

Only one CustomActionData?

I've read everything I can find on CustomActionData, as it seems to be one way to pass information from Immediate execution to Deferred execution.

a) Is this property limited to a single instance, or
b) Is there a way to retrieve more than one property in that manner?

If a) is the answer, what's a better way to pass information from Immediate to Deferred? Registry, XML file, environment variable?
Labels (1)
0 Kudos
(5) Replies
heiner_violet
Level 7

Hi dave,
b) is the answer. You can pass multiple Properties separated by semicola (or something else). In an Installscript CA you can use the Split-command to retrieve the separate values. See Macrovision Helpnet keyword "CustomActionData".

P.S. Somebody (I've forgotten who and where it was) has implemented a pattern in installscript by the which it is easy to store and retrieve Property-values in a CustomActionData.

Best regards, H.
0 Kudos
Stefan_Krueger
Level 9

The sample code is here:
http://www.installsite.org/pages/en/msi/ca.htm
Decode the CustomActionData Property in InstallScript

And to avoid any confusion: each deferred custom action has its own instance of CustomActionData. But each custom action has only one, so if you want to pass multiple data to one A then you need to pack and split them as heiner_violet described.
Stefan Krueger
InstallSite.org
0 Kudos
rootme
Level 4

Hi,

Is there an InstallScript code to split the Property Value and MsiGetProperty for each value (I have more the one value [VALUE1];[VALUE2];[VALUE3]) ?

In the Help there is only a VB Script.

Thanks,
Bianca
0 Kudos
heiner_violet
Level 7

Follow the link given by Stefan Krueger and unzip the file beneath "Decode the CustomActionData Property in InstallScript". This is an installscript sample to split a given CA Data.
0 Kudos
vanchuri
Level 2

Stefan Krueger wrote:
The sample code is here:
http://www.installsite.org/pages/en/msi/ca.htm
Decode the CustomActionData Property in InstallScript

And to avoid any confusion: each deferred custom action has its own instance of CustomActionData. But each custom action has only one, so if you want to pass multiple data to one A then you need to pack and split them as heiner_violet described.


Very helpful.
The understanding is that, the third parameter in MsiGetProperty function is of type string, where in this case we get the biiiiiig string -> list of properties separated by semicolons.
So, whatever the string maybe, we need to split it based on the delimiter.

---
Vijay kumar Anchuri
0 Kudos