简体   繁体   中英

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM