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>)
(For registry) Represents the key path (string value).
(For XML) Represents the complete file path.
(For registry) Represents the value name (string value).
(For XML) Represents the valid XPath query.
Represents the value.
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
SetValue("HKLM\\Destination", "String Value", "This is a string value", STRING);
SetValue("C:\\abc.xml", "/docnode/node1/node2", "It is a node", "");
|
Copyright © 2013 CA.
All rights reserved.
|
|