MsiCollectUserInfo Function

Windows Installer

MsiCollectUserInfo Function

The MsiCollectUserInfo function obtains and stores the user information and product ID from an installation wizard.

Syntax

C++UINT MsiCollectUserInfo(
  __in  LPCTSTR szProduct
);

Parameters

szProduct [in]

Specifies the product code of the product for which the user information is collected.

Return Value

Value Meaning
ERROR_INVALID_PARAMETER

An invalid parameter was passed to the function.

ERROR_SUCCESS

The function succeeded.

An error relating to an action

See Error Codes.

Initialization Error

An error relating to initialization occurred.

 

Remarks

The MsiCollectUserInfo function is typically called by an application during the first run of the application. The application first calls MsiGetUserInfo. If that call fails, the application calls MsiCollectUserInfo. MsiCollectUserInfo opens the product's installation package and invokes a wizard sequence that collects user information. Upon completion of the sequence, user information is registered. Since this API requires an authored user interface, the user interface level should be set to full by calling MsiSetInternalUI as INSTALLUILEVEL_FULL.

The MsiCollectUserInfo invokes a FirstRun Dialog.

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
Unicode and ANSI namesMsiCollectUserInfoW (Unicode) and MsiCollectUserInfoA (ANSI)

See Also

Application-Only Functions
Error Codes
Initialization Error

Send comments about this topic to Microsoft

Build date: 8/13/2009

© 2009 Microsoft Corporation. All rights reserved.