SetExternalUI Method (uiHandler, messageFilter)

Microsoft Deployment Tools

Deployment Tools Foundation SetExternalUI Method (uiHandler, messageFilter)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstallerInstallerSetExternalUI(ExternalUIHandler, InstallLogModes)
Enables an external user-interface handler. This external UI handler is called before the normal internal user-interface handler. The external UI handler has the option to suppress the internal UI by returning a non-zero value to indicate that it has handled the messages.
Declaration Syntax
C# Visual Basic Visual C++
public static ExternalUIHandler SetExternalUI(
	ExternalUIHandler uiHandler,
	InstallLogModes messageFilter
)
Public Shared Function SetExternalUI ( _
	uiHandler As ExternalUIHandler, _
	messageFilter As InstallLogModes _
) As ExternalUIHandler
public:
static ExternalUIHandler^ SetExternalUI(
	ExternalUIHandler^ uiHandler, 
	InstallLogModes messageFilter
)
Parameters
uiHandler (ExternalUIHandler)
A callback delegate that handles the UI messages
messageFilter (InstallLogModes)
Specifies which messages to handle using the external message handler. If the external handler returns a non-zero result, then that message will not be sent to the UI, instead the message will be logged if logging has been enabled.
Return Value
The previously set external handler, or null if there was no previously set handler
Remarks

To restore the previous UI handler, a second call is made to SetExternalUI using the ExternalUIHandler returned by the first call to SetExternalUI and specifying None as the message filter.

The external user interface handler does not have full control over the external user interface unless SetInternalUI(InstallUIOptions) is called with the uiLevel parameter set to Silent. If SetInternalUI is not called, the internal user interface level defaults to Basic. As a result, any message not handled by the external user interface handler is handled by Windows Installer. The initial "Preparing to install..." dialog always appears even if the external user interface handler handles all messages.

SetExternalUI should only be called from a bootstrapping application. You cannot call it from a custom action

Win32 MSI API: MsiSetExternalUI

Assembly: Microsoft.Deployment.WindowsInstaller (Module: Microsoft.Deployment.WindowsInstaller) Version: 3.0.0.0 (3.5.1623.0)