SilentWriteData

InstallShield 2014 » InstallScript Language Reference

The SilentWriteData function records selections made in custom dialogs during the installation. This selection data is written to an .iss file for use by InstallShield Silent. To write to an .iss file during an installation, run the installation using the -r switch with Setup.exe.

Custom dialogs can be resources that you call and handle in your installation script using functions like EzDefineDialog and WaitOnDialog, or they can be completely external, executed as calls to functions in DLLs. In either case, you must use SilentWriteData to record the dialog's button return value (Next, Back, Cancel, and so on) and any values set or returned in variables.

Syntax

SilentWriteData ( szSection, szValName, nValType, szVal, nVal );

Parameters

SilentWriteData Parameters

Parameter

Description

szSection

Specifies the name of the dialog data section in the .iss file. Do not include the square brackets ( [ ] ). The parameter szSection takes the form <functionname>-<number>, where <functionname> is the name of the dialog function as it is used in the script, and <number> is the number of the occurrence of that dialog in the script, beginning with 0 (zero). For example, the first occurrence of the MyDialog function dialog would have a value of "MyDialog-0" for szSection, the second occurrence "MyDialog-1," the third "MyDialog-2," and so on.

szValName

Specifies the value name that appears in the dialog data section of the .iss file. Every dialog has at least one value for szValName—"Result"—which identifies the value returned by the dialog button controls (BACK, NEXT, OK, or CANCEL). Other value names are used to identify values and data associated with the other dialog controls.

nValType

Identifies the data type of the value assigned to the value name in szValName. The value itself is stored in either szVal or nVal, depending upon the value of nValType. Pass one of the following predefined constants in this parameter:

DATA_STRING—The value assigned to the value name in szValName is of type STRING. Its value will be stored in szVal.
DATA_NUMBER—The value assigned to the value name in szValName is of type NUMBER. Its value will be stored in nVal.
DATA_COMPONENT—The value assigned to the value name in szValName is the name of a component. It will be stored in szVal.
DATA_LIST—The value assigned to the value name in szValName is the list ID for an InstallShield list. It is stored in nVal.

szVal

Specifies the value assigned to the value name in szValName when nValType is DATA_STRING or DATA_COMPONENT.

nVal

Specifies the value assigned to the value name in szValName when nValType is DATA_NUMBER or DATA_LIST.

Return Values

SilentWriteData Return Values

Return Value

Description

0

SilentWriteData successfully wrote the dialog data for the custom dialog to Setup.iss.

< 0

SilentWriteData was unable to write the dialog data for the custom dialog to Setup.iss.

See Also