Detect Adobe Reader and Office version

(imported topic written by fhack)

I am trying to create a relevance that check the registry for Adobe Reader and 9.3.1 for the version or lower.

Also trying to detect if Office 2007 or 2010 is installed in another relevance.

I was trying to do this for Office:

(((exists file 
"excel.exe" whose ((it >= 
"12" AND it >= 
"12.0.6215.1000") of version of it) of it) OR (exists file 
"groove.exe" whose ((it >= 
"12" AND it >= 
"12.0.6215.1000") of version of it) of it) OR (exists file 
"infopath.exe" whose ((it >= 
"12" AND it >= 
"12.0.6215.1000") of version of it) of it) OR (exists file 
"msaccess.exe" whose ((it = 
"12" AND it < 
") of version of it) of it) OR (exists file "mspub.exe
" whose ((it = "12
" AND it >= "12.0.6215.1000
") of version of it) of it) OR (exists file "onenote.exe
" whose ((it >= "12
" AND it >= "12.0.6215.1000
") of version of it) of it) OR (exists file "outlook.exe
" whose ((it >= "12
" AND it >= "12.0.6215.1000
") of version of it) of it) OR (exists file "powerpnt.exe
" whose ((it >= "12
" AND it >= "12.0.6215.1000
") of version of it) of it) OR (exists file "winword.exe
" whose ((it >= "12
" AND it >= "12.0.6215.1000
") of version of it) of it)) of folder (value "Path
" of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\Common\InstallRoot
" of registry as string)) OR ((exists file "mso.dll
" whose ((it >= "12
" AND it >= "12.0.6215.1000
") of version of it) of it) of folder ((value "CommonFilesDir
" of key "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion
" of registry) as string & "\Microsoft Shared\OFFICE12
")) or (((exists file "excel.exe
" whose ((it = "14
" AND it < ") of version of it) of it) OR (exists file 
"groove.exe" whose ((it = 
"14" AND it < 
"14.0.6015.1000") of version of it) of it) OR (exists file 
"infopath.exe" whose ((it = 
"14" AND it < 
"14.0.6009.1000") of version of it) of it) OR (exists file 
"msaccess.exe" whose ((it = 
"14" AND it < 
"14.0.6024.1000") of version of it) of it) OR (exists file 
"mspub.exe" whose ((it = 
"14" AND it < 
"14.0.6026.1000") of version of it) of it) OR (exists file 
"onenote.exe" whose ((it = 
"14" AND it < 
"14.0.6022.1000") of version of it) of it) OR (exists file 
"outlook.exe" whose ((it = 
"14" AND it < 
"14.0.6025.1000") of version of it) of it) OR (exists file 
"powerpnt.exe" whose ((it = 
"14" AND it < 
"14.0.6009.1000") of version of it) of it) OR (exists file 
"winword.exe" whose ((it = 
"14" AND it < 
"14.0.6024.1000") of version of it) of it)) of folder (value 
"Path" of key 
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Common\InstallRoot" of registry as string)) OR ((exists file 
"mso.dll" whose ((it = 
"14" AND it < 
"14.0.6023.1000") of version of it) of it) of folder ((value 
"CommonFilesDir" of key 
"HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion" of registry) as string & 
"\Microsoft Shared\OFFICE14"))

I need it to be able to check in 32bit and 64bit registry’s.

(imported comment written by SystemAdmin)

How about something like this:

q: exists regapp “acrrd32.exe” whose (version of it <= " 9.3.1")

(imported comment written by SystemAdmin)

Try this for detecting Adobe Reader:

(exists key whose (value “DisplayName” of it as string contains “Adobe Reader” AND (it <= “9.3.1”) of (value “DisplayVersion” of it as string as version)) of key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of registry)

(imported comment written by SystemAdmin)

The “BES Inventory and License” site contains analyses code that does something similar to this.