MsiCollectUserInfoW function (msi.h)

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

Syntax

UINT MsiCollectUserInfoW(
  [in] LPCWSTR szProduct
);

Parameters

[in] szProduct

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.

Note

The msi.h header defines MsiCollectUserInfo as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows Installer 5.0 on Windows Server 2012, Windows 8, 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 or Windows XP. See the Windows Installer Run-Time Requirements for information about the minimum Windows service pack that is required by a Windows Installer version.
Target Platform Windows
Header msi.h
Library Msi.lib
DLL Msi.dll

See also

Application-Only Functions

Error Codes

Initialization Error