Comparing Registry Key Value

(imported topic written by SystemAdmin)

I am trying to get the value of the key and it keeps returning false. I can get to the point where it recognizes the key but not the associated value. Any help would be greatly appreciated!

Q:exists key “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\BigFix\BES Installation Generator” whose (exists value “InstallFolder” of it) of registry

A: True

T: 0.122 ms

Q: exists key “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\BigFix\BES Installation Generator” whose (exists value “InstallFolder” whose (it as string as version is “E:\BigFix\BESInstallers” as version) of it) of registry

A: False

T: 0.501 ms

The value is InstallFolder=E:\BigFix\BESInstallers\

Thanks,

Mooney

(imported comment written by jeremylam)

Your second relevance statement looked fine except for extra “as version” inspectors which wouldn’t work on normal strings:

Q: exists key “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\BigFix\BES Installation Generator” whose (exists value “InstallFolder” whose (it as string = “E:\BigFix\BESInstallers”) of it) of registry

(imported comment written by SystemAdmin)

That Worked. Thanks!! How can I now get the Relevence Clause to return the value of the key and use it in a subsequent statement?

(imported comment written by jeremylam)

You can take your first relevance statement and put it in an if statement to check if it exists, and if it does output the value:

if (exists key “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\BigFix\BES Installation Generator” whose (exists value “InstallFolder” of it) of registry) then (value “InstallFolder” of key “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\BigFix\BES Installation Generator” of registry as string) else “Does not exist”

Or use the new 8.0 pipe “|” operator which does the same thing, which much less duplicated text:

(value “InstallFolder” of key “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\BigFix\BES Installation Generator” of registry as string) | “Does not exist”