RegDBSetAppInfo

InstallShield 2016 » InstallScript Language Reference

Project • For InstallScript MSI and Basic MSI projects, it is recommended that you use the Registry view in InstallShield instead of creating registry keys and values through InstallScript code. Handling all of your registry changes in this way allows for a clean uninstallation through the Windows Installer service.

The RegDBSetAppInfo function sets the value of a particular value name under the application information key in the registry. RegDBSetAppInfo is a special registry-related function, designed to work with certain predefined registry keys.

Note • The InstallScript engine currently does not support writing or reading Add or Remove Programs information for a product in the 64-bit part of the registry. Therefore, using the REGDB_OPTION_WOW64_64KEY option with the REGDB_OPTIONS system variable is not supported for this registry function. Enabling the REGDB_OPTION_WOW64_64KEY option has no effect on where registry entries are created by this function.

Syntax

RegDBSetAppInfo ( szName, nType, szValue, nSize );

Parameters

RegDBSetAppInfo Parameters

Parameter

Description

szName

Specifies the value name whose information is to be set.

nType

Specifies the type of data you are setting. Pass one of the following predefined constants in this parameter:

REGDB_STRING—String variable, no newline characters allowed.
REGDB_STRING_EXPAND—String variable holding an expandable environment variable expression, such as "%MYPATH%".
REGDB_STRING_MULTI—String variable, newline characters allowed.
REGDB_NUMBER—Number expressed as a string and passed in a string variable.
REGDB_BINARY—Binary data stored in a string.

szValue

Specifies the value to set for the value name.

nSize

Specifies the size, in bytes, of the data passed to RegDBSetAppInfo. Pass -1 in this parameter to indicate that InstallShield should determine the size of the data.

Return Values

RegDBSetAppInfo Return Values

Return Value

Description

0

Indicates that the function successfully assigned the value to the value name.

< 0

Indicates that the function was unable to assign the value.

Additional Information

By default, any text that is surrounded by angle brackets—for example, "<my registry entry text>"—in this function’s string arguments is interpreted as a text substitution and is processed accordingly. To disable text substitution processing for the string arguments of registry functions, call Disable with the REGISTRYFUNCTIONS_USETEXTSUBS argument.

See Also