pi.314
pi.314

Reputation: 620

How to set WiX property from deferred CustomAction (c++ dll)

I have a WiX installer that runs extern function in c++ dll as an custom action (Execute="deferred"). I pass needed property values to it by setting property which name is exacly the same as ID of CustomAction (custActID in example below).

<CustomAction Id="SetOutputProperty" Property="custActID"
          Value="ONE=[ONE];TWO=[TWO];THREE=[THREE];" />
<CustomAction Id="custActID"
          BinaryKey="BIN_MY_DLL"
          DllEntry="dllEntryFunction"
          Impersonate="no"
          Execute="deferred"
          Return="check" 
          HideTarget='yes' />

Then i can get all data in c++ dll using:

 MsiGetProperty(hInstall, "CustomActionData")

My question: is it possible to Set some property in WIX from this dll?

So: I have the ptoperty, let say THREE in Wix. I pass it to dll. Dll will get some data from user (verify them in some special way if they're correct) and finally update this rproperty THREE. I'd like to pass it back to WIX.

Upvotes: 1

Views: 862

Answers (1)

Bob Arnson
Bob Arnson

Reputation: 21886

No, deferred custom actions cannot set properties. When deferred custom actions run, the custom action data has already been set, so custom actions can't affect the data passed to later custom actions.

Upvotes: 3

Related Questions