SdCustomerInformationEx

InstallShield 2014 » InstallScript Language Reference

Project: This information applies to the following project types:

InstallScript
InstallScript MSI

The SdCustomerInformationEx function displays a dialog that enables the end user to specify the user name, company name, and serial number for the product being installed. The dialog may also include radio buttons that let the end user specify whether the product should be installed for all users or only the current user.

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 SdCustomerInformationEx 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\2014\Samples\InstallScript\Serial Number Validation Sample Project.

Syntax

SdCustomerInformationEx ( szTitle, svName, svCompany, svSerial, bvAllUsers );

Parameters

SdCustomerInformationEx Parameters

Parameter

Description

szTitle

Specifies the title of the dialog. To display the default title (“Customer Information”), 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.

bvAllUsers

Returns which option the end user selected. After the function returns, bvAllUsers is set to one of the following values:

TRUE—The Anyone who uses this computer [all users] option is selected.

If the end user selects this option in an InstallScript installation, the function sets the system variable ALLUSERS to a non-zero value.

If the end user selects this option in an InstallScript MSI installation, the function sets the ALLUSERS property to a value of 2.

FALSE—The Only for me [user name] option is selected.

If the end user selects this option in an InstallScript installation, the function sets the ALLUSERS variable to FALSE.

The default option is not based on the current value of the bvAllUsers parameter, but on the ALLUSERS Windows Installer property in an InstallScript MSI installation, or on the ALLUSERS system variable in an InstallScript installation:

If the ALLUSERS property is 2 or the ALLUSERS system variable is non-zero, the all-users option is selected by default.
If the ALLUSERS property is 1 or the ALLUSERS system variable is FALSE, the per-user option is selected by default.

One or both of the radio buttons can be disabled or hidden by updating script variables as follows:

DISABLE_PERUSERBTN—Indicates that the per-user option should be disabled (or hidden if HIDE_DISABLED_BTNS is TRUE) in cases where it would normally be enabled. The default value of this variable is FALSE. Note that the per-user option is always hidden on Windows 9x platforms, regardless of the value of this variable.
DISABLE_ALLUSERBTN—Indicates that the all-users option should be disabled (or hidden) in cases where it would normally be enabled. The default value of this variable is FALSE. Note that the all-users option is always hidden if the installation is being run without administrator or power-user privileges, regardless of the value of this variable.
HIDE_DISABLED_BTNS—Indicates that both options should be hidden instead of being disabled. The default value of this variable is TRUE. Note that when this variable is set to TRUE, both options are hidden if either option is determined to be disabled.

Return Values

SdCustomerInformationEx 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