Issue with Relevance regarding Reg Keys

Hello all,

I was writing some relevance to check for some Registry keys, and then I was cleaning those relevance up to condense them and I ran into an issue that I am not even sure how to elaborate on.

If I am looking for a Registry key - and multiple levels of that key path do not exisit, everything works fine, if I am just asking if the final key exisits, and even seems to work, when I do a case statement, and I spell out the key path each time, but at soon as I try to clean it up with an “(If exists IT) of key of registry” and drop the key path outside of the statement everything seems to fall apart.

Is this just something I am not allowed to do? Or is there some other way I should be building the statement?

Blockquote
Q: if exists key “HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS1.1\Client” of native registry then “Exists” else “Key Not Exist”
A: Key Not Exist
T: 0.079 ms
I: singular string

Q: (if exists it then “Exists” else “Key Not Exist”) of key “HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS1.1\Client” of native registry
E: Singular expression refers to nonexistent object.

Q: (if exist key “HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS1.1\Client” of native registry then (if exist value whose (Name of it is “DisabledByDefault”) of it then (it as string) of value “DisabledByDefault” of it else “Value not exists”) else “Not exists key”) of key “HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS1.1\Client”
E: The operator “key” is not defined.

Blockquote

I am not sure what you are trying to accomplish but lets start with a couple of queries that may help you.

q: (names of it, it) of values of key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Client" of native registry
A: Enabled, 0
A: DisabledByDefault, 1
T: 0.516 ms


q: exists value whose (name of it is "DisabledByDefault") of key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Client" of native registry
A: True
T: 0.239 ms

See if you can work with that to get what you need.