Reg_UpdateExpandString
Description
Section titled “Description”Adds a value to the end of an existing expandable string variable (REG_EXPAND_SZ). sSeperator is inserted between the existing value and the new value.
If the current value already contains sValue (not case-sensitive), the variable isn’t changed.
The variable must exist. If it doesn’t, the function returns FALSE. If the variable exists but is empty, it isn’t changed. To create the variable, use Reg_SetExpandString.
Syntax
Section titled “Syntax”Reg_UpdateExpandString(sHandle, sKey, sVariable, sValue, sSeperator) as Boolean
Parameters
Section titled “Parameters”sHandle (String)
Section titled “sHandle (String)”Registry hive, for example HKLM. For all accepted values, see Registry Functions.
sKey (String)
Section titled “sKey (String)”Subkey path
sVariable (String)
Section titled “sVariable (String)”Name of variable to contain the value
sValue (String)
Section titled “sValue (String)”Value to add
sSeperator (String)
Section titled “sSeperator (String)”Separator to insert between the existing value and sValue, for example ;
Return value
Section titled “Return value”The new value is stored in gsValue.
Example
Section titled “Example”If bStatus Then bStatus = Reg_UpdateExpandString("HKLM", "Software\KeyName", "ValueName", "%dev%|%Test%", "|")