This function writes an expand string value in the opened registry key.
WriteExpandStringValue (ValueName As String, Value As String) As Long
Parameters
ValueName
[in] Name of the value to read.
Value
[in] The string value to write.
Return Value
0: success
1: value name not accessible
Remark
An expand string is like a regular string, except that it can hold environment variables. Those variables can be expanded with their contents when reading them.
For example, if an expand string value in the registry hold the following value: "%SystemRoot%", and we read that value with the Expand parameter to TRUE, we will receive a string like: "c:\windows".