Skip to content

Reg_UpdateExpandString

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.

Reg_UpdateExpandString(sHandle, sKey, sVariable, sValue, sSeperator) as Boolean

Registry hive, for example HKLM. For all accepted values, see Registry Functions.

Subkey path

Name of variable to contain the value

Value to add

Separator to insert between the existing value and sValue, for example ;

The new value is stored in gsValue.

If bStatus Then bStatus = Reg_UpdateExpandString("HKLM", "Software\KeyName", "ValueName", "%dev%|%Test%", "|")

Scripting Guidelines

Registry Functions Constants Package Property Variables