[wix-users] Show modal MessageBox in C# CA from MSI

Heiner Violet H.Violet at medidok.de
Mon Mar 13 01:50:53 PDT 2017


The problem is, I have no owner.
The MsgBox is called from a Custom Action within an MSI Package of our bundle.
In the CA I have only access to the Microsoft.Deployment.WindowsInstaller.Session object which doesn't - as it appears to me - provide access to the main window.


-----Original Message-----

HI

Have you tried to set the "Owner", the first property, to something?

Not sure what you should set it to , maybe "this", but setting owner usually set the messagebox as modal.

/Ronny Eriksson 

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Heiner Violet
Sent: den 10 mars 2017 17:39
To: wix-users at lists.wixtoolset.org
Subject: [wix-users] Show modal MessageBox in C# CA from MSI

Hi,

Our BA installs several MSI-Packages. One MSI calls a C# CA where we would like to show a MsgBox with an information.
Calling System.Windows.MessageBox.Show has he disadvantage that the box isn't modal and my appear in the background oft he main UI.

I read that session.Message achieves my goal - but I didn't get this work - the information appears ONLY in the log-file an is NOT displayed in a msgBox.

My call looks like this: session.Message(InstallMessage.User | (InstallMessage)MessageButtons.OK, record);

I also read, that ...

Custom actions triggered via a DoAction control event cannot show message boxes.

My CA is scheduled in the InstallExec-Sequence with Execute="Immediate".


Thanks in advance,
Heiner.

____________________________________________________________________
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