Relevance for key whose name of it contains

Hello,

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:

HKEY_USERS\S-1-5-21-2094659166-1252953166-2915595948-1004

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
2 Likes

THANKS! This worked.