[wix-users] Message Box in Wix Control & Custom Action
Ven H
venh.123 at gmail.com
Tue Apr 3 23:31:26 PDT 2018
Thanks a lot, Nir. I could make the second approach working. But from
within a custom action, I am not able to get it working. I have the
following code in my custom action. It is not displaying a message box.
Record record = new Record();
record.FormatString = "Test Message!";
session.Message(InstallMessage.User, record);
return ActionResult.Success;
In my Product.wxs, I have the following CustomAction element.
<CustomAction Id="CA_MsgBoxTest" BinaryKey="MsgBoxTestCADLL"
DllEntry="DisplayMsg" Execute="immediate" Return="check"></CustomAction>
However, I don't have any Custom element defined inside
InstallExecuteSequence or InstallUISequence, since I am not sure how to
call this action only on button click. Please help.
Regards,
Venkatesh
On Wed, Apr 4, 2018 at 12:09 AM, Nir Bar <nir.bar at panel-sw.com> wrote:
> You can do both ways:
>
> For C# custom action, use session.Message() with InstallMessage.User,
> InstallMessage.Warning or InstallMessage.Error for first parameter.
> The function uses the underlying MsiProcessMessage() API which takes care
> of UI level.
>
> For the MSI approach, author a dialog to display the message you need and
> then in the PushButton publish a SpawnDialog event.
>
> --
> *Nir Bar, **Independent WiX Expert. Creator of-*
> *JetBA: WiX **WPF **Bootstrapper User Interface Framework*
> *JetBA++: **WiX Native **Bootstrapper User Interface Framework*
>
>
>
More information about the wix-users
mailing list