Obtain a specific key name when it includes a value name inside of a parent key

Hey There,

I’m trying to build an expression that finds the key name of a key when it contains a specific value name, so far i came up with this, but no matter what i do, i get “The operator “key” is not defined.”, and i’m still struggling to find the right combination.

name of key whose (exist value “S5WakeOnLan” of (keys of it) of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class{4d36e972-e325-11ce-bfc1-08002be10318}” of registry)

(This should theoretically find the key name of a realtek network adapter class with wake on lan, which is a random key named in numbers like 0001 or any 4 digit number that are assigned in order of installation by windows)

the original query I based this, does work:
exist value “S5WakeOnLan” of (keys of it) of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class{4d36e972-e325-11ce-bfc1-08002be10318}” of registry

Any ideas what might be wrong in the syntax?

Thanks!

I haven’t tested this, but perhaps the following syntax might work for you:

names of keys whose (exists value "S5WakeOnLan" of it) of keys "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}" of registry
1 Like

Hi Aram, thanks it works :slight_smile:

i was almost there just before you answered, i did the following, but returned the name + “,1”

(name of it, value “S5WakeOnLan” of it) of keys whose(exists value “S5WakeOnLan” of it) of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class{4d36e972-e325-11ce-bfc1-08002be10318}” of registry

thanks again!

1 Like