Skip to content

$cs.Reg\_GetExpandString

$cs.Reg_GetExpandString(string registryroot, string regkey, string regvalue)

registryroot

Root key (HKLM or HKEY_LOCAL_MACHINE, HKCU, HKU)

regkey

Registry keypath

regvalue

Registry value to retrieve (empty string for default value)

$filepath=$cs.Reg_GetExpandString("HKU",".DEFAULT\Environment","Path")

returns value as string