Full Custom WPF UI : return feedback from customaction to any of the events/callbacks in GenericSetup

Jun 12, 2015 at 11:38 AM
Is there a way to send back some data (string is enough) from a custom action to any of the events available in GenericSetup ?

I tried GenericSetup.Message(InstallMessage.Info, Record ) but it doesn't seems to show up in OnActionData or OnInfo (these are the two I tried).

The message does show up in the log file, but I need it in one of the handlers of GenericSetup.
Jun 12, 2015 at 1:34 PM
I don't know how exactly access the session of the running MSI. The GenericSetup was developed with ExternalUI in mind and main emphasis was made on the receiving progress message but not nesesarely exchnging data between UI-exe and MSI-runtime. I am sure there is a way but I just don't know what it is exactly. Most likely UI can receive a runtime handle to the database and it can be used to query "Properties" table, which is in populated from the MSI CusomAction. May be there are more straight forward approaches.

Though I think you may achieve the same with much less effort if you use EmbeddedUI. The latest release just got this feature delivered. There is the both WinForm and WPF samples (EmbeddedUI and EmbeddedUI_WPF), withe the embedded UI the WiX session object (Microsoft.Deployment.WindowsInstaller.Session) is directly available in the UI context so it should be very easy to write and read data from it.