MigrateUser9x

[This is preliminary documentation and subject to change.]

Gather information concerning the users, and save private data to be used during the later call to MigrateUserNT.

LONG
CALLBACK 
MigrateUser9x(
    IN HWND ParentWnd, 
    IN LPCSTR AnswerFile,
    IN HKEY UserRegKey, 
    IN LPCSTR UserName, 
    LPVOID Reserved
    );

Parameters

ParentWnd
Specifies a handle to the parent window for any dialog boxes or windows that you may want your migration DLL to display.

Note You should not display a user interface unless absolutely necessary.

If this parameter is NULL, Setup is running in an unattended mode and your DLL must not display user interface elements or prompt the user for input.

AnswerFile
Points to a copy of the Windows NT Setup answer file (typically UNATTEND.TXT), which is used to automate the installation of Windows NT. You can access this file using the Win32 profile APIs (for example, GetPrivateProfileString and WritePrivateProfileString). Some sections of this answer file cannot be modified by your DLL. For more information, see Using the Setup Answer File.
UserRegKey
Provides a registry handle to the user hive of the Windows 95 or Windows 98 user specified in the UserName parameter. This user hive is equivalent to the user's HKEY_CURRENT_USER (HKCU) when that user logs on. This handle is valid only within the scope of MigrateUser9x and is provided for user-specific information gathering purposes.
UserName
Provides the user name (for example, "username") for the Windows 95 or Windows 98 user whose registry information is supplied through the UserRegKey parameter. A value of NULL refers to the default Windows 95 or Windows 98 user account (that is, the account used when a user accesses the system by skipping the log on process). UserName may also be "Administrator" even though Windows 95 and Windows 98 do not have an administrator account. This allows a migration DLL to collect information for the Windows NT Administrator account to be created later.
Reserved
Reserved for future use.

Return Values

ERROR_SUCCESS if the target application is installed for the specified user. Also return ERROR_SUCCESS if your migration DLL needs further processing during the Windows NT phase.

ERROR_NOT_INSTALLED if your target application is not installed for the specified user account and that user's registry does not require any processing. However, Setup will continue to call MigrateUser9x for the rest of the users and MigrateSystem9x if this function returns ERROR_NOT_INSTALLED.

ERROR_CANCELLED if the user wants to exit Setup. You should specify this return value only if ParentWnd is not set to NULL.

All other return values (Win32 error values) are considered initialization errors. Setup reports the error to the user and prompts to abort or continue the upgrade.

Exceptions generated by your migration DLL cause Setup to report RPC error messages. Setup provides more information in SETUPERR.LOG.

Remarks

A DLL must always check for the value of ParentWnd in MigrateUser9x before proceeding since its value determines whether UI can be displayed to the user.

Do not use the MigrateUser9x function for user account modification. Use it only for information gathering about user accounts. To modify user-specific settings, save the data collected to your provided working directory and then use the MigrateUserNT function to perform the modifications.

Use the DLL working directory provided by the Initialize9x WorkingDirectory parameter to store any user-specific configuration information you may want to keep track of. Remember to use the UserName parameter to differentiate the information about the various users.