SdRegisterUserEx

InstallShield 2015 » InstallScript Language Reference

Project: This information applies to the following project types:

InstallScript
InstallScript MSI

The SdRegisterUserEx function displays a dialog that enables the end user to specify the user name, company name, and serial number for the product being installed.

You can specify default values for these fields by specifying the appropriate parameters. If you specify a null string (""), the function uses the appropriate script variable.

The Next button becomes enabled only when data exists in all three edit fields. The end user cannot leave any field blank.

Note: The SdRegisterUserEx function does not verify the serial number. To learn how to add code that verifies the serial number, see the sample serial number validation project. This sample project is in one of the Samples subfolders within the InstallShield Program Files folder. The default installation location is C:\Program Files\InstallShield\2015\Samples\InstallScript\Serial Number Validation Sample Project.

Syntax

SdRegisterUserEx ( szTitle, szMsg, svName, svCompany, svSerial );

Parameters

SdRegisterUserEx Parameters

Parameter

Description

szTitle

Specifies the title of the dialog. To display the default title (“User Information”), pass a null string (“”) in this parameter.

szMsg

Specifies the message to display in the dialog. To display the default instructions for this dialog, pass a null string (“”) in this parameter.

svName

Specifies the default value for the Name edit field when the function is called.

If a null string ("") is specified, the default value is the current value of the IFX_PRODUCT_REGISTEREDOWNER variable. For an InstallScript project, this variable is read from the registry in a first-time installation or the corresponding text substitution in maintenance mode. For an InstallScript MSI project, the default value of the variable is always read from the Windows Installer property USERNAME.

The function returns the value that the end user specified in this parameter. In an InstallScript installation, the function also sets the value of IFX_PRODUCT_REGISTEREDOWNER to the value that the end user specified. In an InstallScript MSI installation, the function automatically updates the Windows Installer property USERNAME.

svCompany

Specifies the default value for the Company edit field when the function is called.

If a null string ("") is specified, the default value is the current value of the IFX_PRODUCT_REGISTEREDCOMPANY variable. For an InstallScript project, this variable is read from the registry in a first-time installation or the corresponding text substitution in maintenance mode. For an InstallScript MSI project, the default value of the variable is always read from the Windows Installer property COMPANYNAME.

The function returns the value that the end user specified in this parameter. In an InstallScript installation, the function also sets the value of IFX_PRODUCT_REGISTEREDCOMPANY to the value that the end user specified. In an InstallScript MSI installation, the function automatically updates the Windows Installer property COMPANYNAME.

svSerial

Specifies the default value for the Serial Number edit field when the function is called.

If a null string ("") is specified, the default value is the current value of the IFX_PRODUCT_REGISTEREDSERIALNUM variable. This variable is read from the registry in a first-time installation or the corresponding text substitution in maintenance mode.

The function returns the value that the end user specified in this parameter. The function also sets the value of IFX_PRODUCT_REGISTEREDSERIALNUM to the value that the end user specified.

Return Values

SdRegisterUserEx Return Values

Return Value

Description

NEXT (1)

Indicates that the Next button was clicked.

BACK (12)

Indicates that the Back button was clicked.

Additional Information

To view an example of this or other dialogs for your installation, use the Dialog Sampler. In InstallShield, on the Tools menu, point to InstallScript, then click Standard Dialog Sampler or Skinned Dialog Sampler.

See Also