MsiSetInternalUI Function

Windows Installer

MsiSetInternalUI Function

The MsiSetInternalUI function enables the installer's internal user interface. Then this user interface is used for all subsequent calls to user-interface-generating installer functions in this process. For more information, see User Interface Levels.

Syntax

C++INSTALLUILEVEL MsiSetInternalUI(
  __in     INSTALLUILEVEL dwUILevel,
  __inout  HWND *phWnd
);

Parameters

dwUILevel [in]

Specifies the level of complexity of the user interface. This parameter can be one of the following values.

Value Meaning
INSTALLUILEVEL_FULL

Authored user interface with wizards, progress, and errors.

INSTALLUILEVEL_REDUCED

Authored user interface with wizard dialog boxes suppressed.

INSTALLUILEVEL_BASIC

Simple progress and error handling.

INSTALLUILEVEL_DEFAULT

The installer chooses an appropriate user interface level.

INSTALLUILEVEL_NONE

Completely silent installation.

INSTALLUILEVEL_ENDDIALOG

If combined with any above value, the installer displays a modal dialog box at the end of a successful installation or if there has been an error. No dialog box is displayed if the user cancels.

INSTALLUILEVEL_PROGRESSONLY

If combined with the INSTALLUILEVEL_BASIC value, the installer shows simple progress dialog boxes but does not display any modal dialog boxes or error dialog boxes.

INSTALLUILEVEL_NOCHANGE

No change in the UI level. However, if phWnd is not Null, the parent window can change.

INSTALLUILEVEL_HIDECANCEL

If combined with the INSTALLUILEVEL_BASIC value, the installer shows simple progress dialog boxes but does not display a Cancel button on the dialog. This prevents users from canceling the install.

INSTALLUILEVEL_SOURCERESONLY

If this value is combined with the INSTALLUILEVEL_NONE value, the installer displays only the dialog boxes used for source resolution. No other dialog boxes are shown. This value has no effect if the UI level is not INSTALLUILEVEL_NONE. It is used with an external user interface designed to handle all of the UI except for source resolution. In this case, the installer handles source resolution.

 

phWnd [in, out]

Pointer to a window. This window becomes the owner of any user interface created. A pointer to the previous owner of the user interface is returned. If this parameter is null, the owner of the user interface does not change.

Return Value

The previous user interface level is returned. If an invalid dwUILevel is passed, then INSTALLUILEVEL_NOCHANGE is returned.

Remarks

The MsiSetInternalUI function is useful when the installer must display a user interface. For example, if a feature is installed, but the source is a compact disc that must be inserted, the installer prompts the user for the compact disc. Depending on the nature of the installation, the application might also display progress indicators or query the user for information.

When Msi.dll is loaded, the user interface level is set to DEFAULT and the user interface owner is set to 0 (that is, the initial user interface owner is the desktop).

Requirements

VersionWindows Installer 5.0 on Windows Server 2008 R2 or Windows 7. Windows Installer 4.0 or Windows Installer 4.5 on Windows Server 2008 or Windows Vista. Windows Installer on Windows Server 2003, Windows XP, and Windows 2000. See the Windows Installer Run-Time Requirements for information about the minimum Windows service pack that is required by a Windows Installer version.
HeaderMsi.h
LibraryMsi.lib
DLLMsi.dll

See Also

Interface and Logging Functions

Send comments about this topic to Microsoft

Build date: 8/13/2009

© 2009 Microsoft Corporation. All rights reserved.