I am trying to build an analysis that detects and returns installed app versions for specific apps. I am successful when only one statement is made but when I try to add an OR statement for possible different installed versions I get an error that, “A Boolean expression is required.” I am not certain why this is since I am asking the same question just with a different place to look for the same data. I have included my examples below. Any help is greatly appreciated!
Works:
q: (if (exists key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1A3CD9C5-7A1D-4349-8AE7-5A620C2BF80D}" whose (exists value "DisplayName" of it) of registry) then (value "DisplayName" of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1A3CD9C5-7A1D-4349-8AE7-5A620C2BF80D}" of registry as string) else "Not Installed")
A: Not Installed
T: 0.109 ms
Doesn’t work:
q: (if (exists key "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\B09BD3CE447C57A4B9BA75D56F0C18A6" whose (exists value "ProductName" of it) of registry) then (value "ProductName" of key "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\B09BD3CE447C57A4B9BA75D56F0C18A6" of registry as string) else "Not Installed") OR (if (exists key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1A3CD9C5-7A1D-4349-8AE7-5A620C2BF80D}" whose (exists value "DisplayName" of it) of registry) then (value "DisplayName" of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1A3CD9C5-7A1D-4349-8AE7-5A620C2BF80D}" of registry as string) else "Not Installed")
E: A boolean expression is required.
I have also moved the “else” statement around thinking that was causing the issue but I have not found the proper syntax.