Relevance for key whose name of it contains


Trying to wrap my head around this one. I know how to get a value from a specific registry key. But lets say for example the key name is random, minus the very last part. Example:


Example of something that works:
value “Printer” of key “HKLM\HARDWARE\DefaultPrinter” of native registry

Here is what I’m looking to do:

value “Printer” of key whose (name of it contains “HKEY_USERS” and it contains “-1004\HARDWARE\DefaultPrinter”) of native registry

I always struggle to see inside HKCU. Do you know if those settings are being written to this hive as well?

(value “printer driver” of it) of keys whose (value “Port” of it as string contains “.”) of keys “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers” of registry

Try this

Q: values "Printer" of keys "HARDWARE\DefaultPrinter" of keys whose (name of it ends with "-1004") of key "HKU" of native registry as string
A: TestvalueOnly
T: 0.314 ms
I: plural string

THANKS! This worked.