[wix-users] session.Message in custom action called from Dialog?

Stephens, Rich RStephens at bottomline.com
Fri Sep 23 14:03:25 PDT 2016


No, just a simple MSI project.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Jon Earle
Sent: Friday, September 23, 2016 5:01 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] session.Message in custom action called from Dialog?

I had a dialog message in my installer (custom bootstrapper)... wouldn't work during an upgrade - the installation just "stuck" with no reason. Removed it and everything was golden thereafter.  I retooled the installer to not require it but, there might be calls for other "warnings to the user" to be implemented.  I hope not!


Are you using a bootstrapper? If so, might you be able to work one in that code, someplace?

________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Stephens, Rich <RStephens at bottomline.com>
Sent: Friday, September 23, 2016 8:53 PM
To: 'WiX Toolset Users Mailing List'
Subject: Re: [wix-users] session.Message in custom action called from Dialog?

So.... how am I to bring up a message box?  I've tried the spawndialog bit, but I seem to have trouble with coming BACK to my config dialog.  If it use the OK button on my error dialog  to "newDialog" back to my existing config dialog, the installer errors out, with an error code 2856.  What am I missing?  I just want the error dialog to pop up, and then to return to my config dialog when you click "OK" on it.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Phil Wilson
Sent: Friday, September 23, 2016 3:57 PM
To: 'WiX Toolset Users Mailing List' <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] session.Message in custom action called from Dialog?

Session.Message results in a call to MsiProcessMessage, which doesn't work from a DoAction ControlEvent:

https://msdn.microsoft.com/en-us/library/windows/desktop/aa368322(v=vs.85).a
spx

Phil W

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Stephens, Rich
Sent: Friday, September 23, 2016 12:21 PM
To: wix-users at lists.wixtoolset.org
Subject: [wix-users] session.Message in custom action called from Dialog?

So, I am trying to validate my custom configuration dialog.

<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17"
Default="yes" Text="Next"> <Publish Event="DoAction"
Value="ValidateConfigSettings">1</Publish>
<Publish Event="NewDialog"
Value="VerifyReadyDlg">CONFIGSETTINGSOK=1</Publish>
</Control>

I am calling a c# custom action to do validation when the "Next" button is pushed.

Here's where I'm calling session.Message in my "ValidateConfigSettings"
custom action:

Record record = new Record();
record.FormatString = errMsg.ToString(); session.Message(InstallMessage.Error
|(InstallMessage)System.Windows.Forms.MessageBoxIcon.Error |
(InstallMessage)System.Windows.Forms.MessageBoxButtons.OK, record);

Everything is working exactly as desired.  The dialog doesn't continue if there's an error, etc, but... the message box doesn't appear.

Am I missing something?

Rich

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



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

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

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


More information about the wix-users mailing list