9.172 PUT_REGISTRY_VALUE
Processing
Adds/updates the value for the specified Registry Key.
Arguments
No. | Type | Req/ Opt | Description | Min Len | Max Len | Min Dec | Max Dec |
|---|---|---|---|---|---|---|---|
1 | A | R | Registry Root For example: HKEY_CLASSES_ROOT, | 1 | 256 | ||
2 | u | R | Registry Path For example: | 1 | 256 | ||
3 | u | R | Registry Key Name | 1 | 256 | ||
4 | X | R | Registry Key Value: | 1 | Unlimited | Unlimited | |
5 | A | O | Value Type: Default Value – S | 1 | 1 | 0 | |
6 | A | O | Create key: | 1 | 1 | ||
7 | N | O | Registry Hive to use: 32 or 64 This argument is ignored on a 32 bit operating system. | 1 | 4 | 0 | 0 |
Return Values
No. | Type | Req/ Opt | Description | Min Len | Max Len | Min Dec | Max Dec |
|---|---|---|---|---|---|---|---|
1 | A | R | Return Code OK – Key added / updated | 2 | 2 |
Registry Key Value Note
If the S type is used to save a field value (except Binary or VarBinary ), the string representation of the field will be saved in the Registry.
If the B type is used to save an Alpha, Char or String field, it is presumed that the field value is a hexadecimal string and it will be converted into its actual value. Any byte in the Alpha, Char or String field must be a 1,2,3,4,5,6,7,8,9,A,B,C,D,E or F character. If a non Hexadecimal character is encountered, it will be replaced with '0' (zero).
If the D type is used to save an Alpha, Char or String field value, it is presumed that the field value is a decimal string representation of a value and it will be converted into that actual value.
The Supported & Default Key Types table shows how the key type is defined by default and also the supported key types for each field type. The default is applied when the 5th argument is not specified. It is strongly recommended that you use the default.
If a non-supported key type is used, a fatal error with the message: "Using non-supported key type" will occur.
Supported & Default Key Types
Field Type | Key Type by Default | Supported Key Type |
|---|---|---|
Alpha, Char and String | S | S, B, D, X |
CLOB, BLOB, Time, | S | S, X |
Less than 8 bytes Integer | S | S, D, X |
Binary | B | B |