Previous Topic: SetKeyNext Topic: Source


SetValue

SetValue

The SetValue command creates or sets a key value. If the key does not exist, this command creates the key.

This command has the following format:

SetValue(<FilePath>, <ValueName>, <Data>, <Type>)
FilePath

(For registry) Represents the key path (string value).

(For XML) Represents the complete file path.

ValueName

(For registry) Represents the value name (string value).

(For XML) Represents the valid XPath query.

Data

Represents the value.

Type

Represents the value type.

The following are the registry values that are accepted:

Value

Format

Example

STRING

string

"Brian"

DWORD

number

"1999"

BINARY

binary

"af 45 99 31"

DWORD_LITTLE_ENDIAN

number

"1234"

DWORD_BIG_ENDIAN

number

"1234"

SYMBOLIC_LINK

binary

"af 45 99 31"

MULTI_STRING

binary

"af 45 99 31"

RESOURCE_LIST

binary

"af 45 99 31"

EXPAND_STRING

string

"Brian"

FULL_RESOURCE_DESCRIPTOR

binary

"af 45 99 31"

RESOURCE_REQUIREMENTS_LIST

binary

"af 45 99 31"

Examples: Set a Key Value