[wix-users] Message Box in Wix Control & Custom Action

Ronny Eriksson ronny.eriksson at optimity.se
Wed Apr 4 10:56:36 PDT 2018


I never got that session.Message to work in my C# CA so I just added the 
using System.Windows.Forms
and then used e.g. 
MessageBox.Show("some text", MessageBoxButtons.OK, MessageBoxIcon.Exclamation) 
to show a message box with some texts and that works for my installer at least .

Ronny Eriksson 

-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Nir Bar via wix-users
Sent: Wednesday, 4 April 2018 19:39
To: Ven H <venh.123 at gmail.com>
Cc: Nir Bar <nir.bar at panel-sw.com>; WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Message Box in Wix Control & Custom Action

The following code works for me in C++
You can try porting it to C#

    hRecord = ::MsiCreateRecord(1);
    ExitOnNullWithLastError(hRecord, hr, "Failed to create a warning record.");

    hr = WcaSetRecordString(hRecord, 0, szMsg);
    ExitOnFailure(hr, "Failed to set warning record message");

    WcaProcessMessage( INSTALLMESSAGE::INSTALLMESSAGE_WARNING, hRecord);






--
Nir Bar, Independent WiX Expert. Creator of-
JetBA: WiX WPF Bootstrapper User Interface Framework

JetBA++: WiX Native Bootstrapper User Interface Framework




____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list