Relevance query question to find a specific software installed

(imported topic written by as14921115)

Can any one please help why this does not return the machine names who for sure have the software installed? I know at least 30 machines in my environment are confirmed to have this software using SCCM and manual check, but this does not show. May be incorrect query. Please help… Thanks.

((exists regapp whose (name of it = “Microsoft Project Professional 2010” ) ) OR (exists regapp whose (name of it = “Microsoft Project Standard 2010” ))) AND ((exists regapp whose (name of it = “Microsoft Project 2010 Service Pack 1 (SP1)” ) ) AND (exists regapp whose (name of it = “Hotfix for Microsoft Project 2010 (KB2536590)” ) ))

(imported comment written by NoahSalzman)

regapp

is a curious inspector. This thread has our answer to this problem:

https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14756428

names of regapps

will return the short name, so your script won’t work as written.

If you want the long name you have to do:

q: exists regapp whose (value 
"FileDescription" of version block 1 of it = 
"Microsoft (R) Contacts Import Tool") A: True   q: regapps A: 
"iexplore.exe" 
"8.0.6001.19190" 
"Internet Explorer" 
"8.00.6001.19190 (longhorn_ie8_gdr.111214-1715)" 
"Microsoft Corporation" A: 
"javaws.exe" 
"7.0.20.255" 
"Java(TM) Web Start Launcher" 
"10.2.1.255" 
"Oracle Corporation" A: 
"mspaint.exe" 
"6.0.6001.18000" 
"Paint" 
"6.0.6001.18000 (longhorn_rtm.080118-1840)" 
"Microsoft Corporation" A: 
"VMwareTray.exe" 
"8.4.7.12773" 
"VMware Tools tray application" 
"8.4.7.12773" 
"VMware, Inc." A: 
"VMwareUser.exe" 
"8.4.7.12773" 
"VMware Tools Service" 
"8.4.7.12773" 
"VMware, Inc." A: 
"vsta.exe" 
"9.0.30729.4462" 
"Microsoft Visual Studio Tools for Applications 2.0" 
"9.0.30729.4462 built by: QFE" 
"Microsoft Corporation" A: 
"wab.exe" 
"6.0.6002.18324" 
"Windows Contacts" 
"6.0.6002.18324 (vistasp2_gdr.101012-0337)" 
"Microsoft Corporation" A: 
"wabmig.exe" 
"6.0.6002.18324" 
"Microsoft (R) Contacts Import Tool" 
"6.0.6002.18324 (vistasp2_gdr.101012-0337)" 
"Microsoft Corporation"

(imported comment written by SystemAdmin)

I personally prefer to query the “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” registry location to detect the presence or lack of installed software, but it does not work well in all cases.

Examples:

not exists key whose (value “DisplayName” of it as string contains “SonicWALL Global VPN Client” AND (value “DisplayVersion” of it as string as version >= “4.2.6” as version)) of key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of x64 registry

exists key whose (value “DisplayName” of it as string contains “Microsoft Visio Premium 2010” AND (it >= “14.0.4763.1000” as version) of (value “DisplayVersion” of it as string as version)) of key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of x32 registry

1 Like