Specifies the name of the key to set; the key must already have been created with RegDBCreateKeyEx. You do not have to include the HKEY_CLASSES_ROOT key (or another specified key) in this parameter. Separate different levels in the subkey with a double backslash (//).
szName
Specifies the value name for the value data to set be set. To set the default value of the key specified in szKey, pass a null string (“”) in this parameter.
nType
Specifies the type of data to be set. Pass one of the following predefined constants in this parameter:
REGDB_STRING—A string variable, no newline characters allowed.
REGDB_STRING_EXPAND—A string variable holding an expandable environment variable expression, such as "%MYPATH%".
REGDB_NUMBER—A number expressed as a string and passed in string variable. Creates data of type DWORD. When nType is REGDB_NUMBER, passing a decimal string in szValue results in a numeric value being stored in the registry. This numeric value is then displayed as a hexadecimal number followed by its decimal equivalent in parentheses. You cannot pass a hexadecimal number in the string in szValue—it must be a decimal number.
REGDB_BINARY—Binary data stored in a string.
szValue
Specifies the value to associate with the value name. All values must be passed as string variables. Numbers must be expressed as strings. InstallShield converts them to numbers internally.
nSize
Specifies the size—in bytes—of the data to be set. You can specify -1 in this parameter when nType is REGDB_STRING, REGDB_STRING_EXPAND, or REGDB_NUMBER, and InstallShield will set the size. However, with REGDB_BINARY and REGDB_STRING_MULTI, you must always specify the number of bytes of binary data that you are storing.
Return Values
RegDBSetKeyValueEx Return Values
Return Value
Description
0
Indicates that the function successfully set the key.
< 0
Indicates that the function was unable to set the key.