Hello,
Apologies if this is a basic question as I am quite new to both C# and DTF.
I am trying to put a test application together to silently run MSI's and
test Custom Actions that are kicked off within them. I am setting the MSI
User Interface to Silent and attempting to add my own handler for the
messages coming in.
The method signature for SetExternalUI is as follows:
public static ExternalUIHandler SetExternalUI(
ExternalUIHandler uiHandler,
InstallLogModes messageFilter
How can I specify more than one InstallLogMode to ensure that all the
necessary messages are handled by my user interface?
At the moment I can only specify one. In reality I need an enum value
something like this: ExternalUI = FatalExit | Error | Warning | User |
ActionStart | ActionData | CommonData | Progress | ShowDialog.
Is there a way to do this with the existing enum or by using the
ExternalUIHandler differently? Here is my existing code:
private void RunInstall(string PathToMSI, string CommandLineArguments)
{
try
{
Installer.SetInternalUI(InstallUIOptions.Silent, ref parent);
ExternalUIHandler handler = new
ExternalUIHandler(ActionStartHandler);
ExternalUIHandler result = Installer.SetExternalUI(handler,
InstallLogModes.ActionData); // can only specify one mode
Session session = Installer.OpenPackage(PathToMSI, false);
//session.DoActionSequence("InstallUISequence");
session.DoActionSequence("InstallExecuteSequence");
session.Close();
}
catch (Exception e)
{
Debug.WriteLine("EXCEPTION -- " + e.ToString());
}
}
public MessageResult ActionStartHandler(InstallMessage MessageType, string
Message, MessageBoxButtons Buttons,
MessageBoxIcon Icons, MessageBoxDefaultButton DefaultButton)
{
switch (MessageType)
{
case InstallMessage.ActionStart:
ChangeListViewProperly(Message + " " +
DateTime.Now.ToString("dd/MM/yyyy HH:mm:fffff"));
break;
case InstallMessage.ActionData:
ChangeListViewProperly(Message + " " +
DateTime.Now.ToString("dd/MM/yyyy HH:mm:fffff"));
break;
}
return MessageResult.OK;
}
Thanks in advance for your help.
Lewis
--
View this message in context:
http://n2.nabble.com/SetExternalUI---Multiple-InstallLogModes-tp2747927p2747927.html
Sent from the wix-devs mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
WiX-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-devs