How to query a (Default) REG_SZ in registry

(imported topic written by amagewick91)

I am trying to write a relevance that tells me if Acrobat.exe or AcroRd32.exe is the program that is associated with opening PDF files. The location to query only has 1 entry with a path to the executable, but it is the (Default) REG_SZ. How can I query this? I have tried also using “@” instead of “(default)” for the value because I see this in the registry export but it doesn’t work either way.

The test code I have is this:

Q: if exists value "@" whose (it as string contains "acrobat.exe") of keys "HKEY_Classes_Root\AcroExch.Document\shell\open\command\" of registry then "acrobat.exe" else "Other"
 
A: Other

(imported comment written by NoahSalzman)

The relevance you are looking for is “default value”.

if exists default value whose (it as string contains “acrobat.exe”) of keys …

Also, there is a short cut for this type of query:

if exists name of application whose (it as string contains “acrobat.exe”) of key “hkey_classes_root.pdf” of registry then …

1 Like

(imported comment written by amagewick91)

Thank you!