Pathname of registry key

(imported topic written by SystemAdmin)

Is there a way to return the full pathname of a registry key?

For instance, for files and folder we can use “pathname of”. Do we have anything like that for a registry key?

Currently it works like this…

name of key “HKEY_LOCAL_MACHINE\Software\BigFix\EnterpriseClient” of registry

…and it returns “EnterpriseClient”

I’d like to do…

pathname of key “HKEY_LOCAL_MACHINE\Software\BigFix\EnterpriseClient” of registry

…and return back “HKEY_LOCAL_MACHINE\Software\BigFix\EnterpriseClient”

-Paul

(imported comment written by sthull)

Hi Paul,

There isn’t a pathname equivalent for the registry. You’re best bet is to concatenate the earlier part of the path that you specified as the key:

“HKLM\SOFTWARE\BigFix” & name of key “HKLM\Software\BigFix\EnterpriseClient” of registry

Regards,

Steve

(imported comment written by SystemAdmin)

Yeah, that’s what it looks like I’ll have to do as a workaround for now.

I have a slightly complicated IF/THEN where I determined a key outside of the IF/THEN, but needed to use the full path within the IF/THEN. (Building a string using the HKCU’s key)

Ended up redoing it and then concatenating it twice. Ended up being a little more messy without having “pathname of registry”, but I got it working about 5 min ago.

Paul