Skip to content

Reg_SetExpandStringX64

Sets the value of a registry variable of type expandable string (REG_EXPAND_SZ) in 64 bit registry from a 32 bit context. If the key doesn’t exist, it’s created.

The value is written as it is: environment variables such as %temp% aren’t expanded.

Reg_SetExpandStringX64(sHandle, sKey, sVariable, sValue) as Boolean

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

Subkey path

Name of variable to contain the value

Value

If bStatus Then bStatus = Reg_SetExpandStringX64("HKLM", "Software\KeyName", "ValueName", "%temp%")

Scripting Guidelines

Registry Functions Constants Package Property Variables