public properties in deferred

E

EP

Ok, there's tons of posts about this and every answer is "use
customactiondata".

I'm working within a merge module. In the InstallUI sequence I have a Set
Property custom action that sets a public property "DESIGNER_ISDIR".
Intended to be set to the retargetable directory, for testing I'm giving it
a string value "TestValue". I've also taken off the module guid a the end
so in every table it shows up as "DESIGNER_ISDIR". It's got a default init
value of "9"

I've inserted it into the installUI sequence, base=ExecuteAction, After=0
(in moduleinstalluisequence)


Now I've got a deferred custom action in the installExecute sequence. When
I call Session.Property("DESIGNER_ISDIR") I am always given a blank value.

Should I be able to get this value? By naming it as I have it is
automatically a public property, right?
 
E

EP

by the way, no I can't use the global property "CustomActionData" because
this is a merge module and it can't interfere with any other custom actions
that may want to use CustomActionData, and when I get this to work it will
be done in more than one merge module for a large msi.
 
A

alan sinclair

you're misunderstanding ... each custom action's input data
is passed from the MSI as a different name ... it's only
when the property is read by the deferred CA that
it's called CustomActionData.

That is, when your deferred Custom Action (dll or whatever)
gets CustomActionData, the info it gets has been passed
from the MSI as a property whose name is the same as the
name of the Custom Action.

Sorry. muddled explanation... let me try to clarify ...

1. the MSI sets a property called e.g. "AlansCustomData"

2. then the MSI calls a deferred Custom Action called
"AlansCustomData" (i.e tha SAME name)

3. the code inside the deferred custom action (inside
the dll or whatever) calls the MSI API to get
the value of the property called CustomActionData
e.g.
GetProperty(a_hSession, TEXT("CustomActionData"))

hth
alan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top