Finding Machines with a Particular Application Installed
Filed under:
Inventory Solution
Reporting
Submitted by eshwar on Tue, 2008-05-13 10:08.
You can find whether a software package is installed on computers on you network by querying the [Inv_AeX_OS_Add_Remove_Programs] table.
Here's how to find the machine name by joining the [Inv_AeX_AC_Identification] table.
QUERY:
SELECT DISTINCT(ACI.[Name]) AS 'Machine Name', ACI.[Domain] AS 'Domain', ARP.[Name] AS 'Application Name' FROM [Inv_AeX_AC_Identification] ACI INNER JOIN [Inv_AeX_OS_Add_Remove_Programs] ARP ON ACI.[_ResourceGuid] = ARP.[_ResourceGuid] WHERE ARP.[Name] LIKE '%Application Name%' ORDER BY ACI.[Name]
(46 votes)
- Login or register to post comments
- 649 reads
- Printer-friendly version
















Uninstall Path
There is also great field "Uninstall Path" that very useful when you need to create uninstall scripts for these applications. For msi packages you just need to modify /i to /x and add /qn on the end - and your script is ready (for Deployment Solution, Task Server or Software Delivery).
Simpler way
Depending on what you need for performance, I recommend joining the vComputer view to get machine name. Your query becomes
Some advantages of vComputer:
If you use "Status" (like retired), it automagically filters out everything but "Active"
It brings back other things like IP Address as well
Disadvantage:
For large databases it can be SLOW. It does a couple of "Top 1" queries as part of it intrinsically, so they can tend to bog down. Never use vComputer for collections for precisely this reason.
Alternate method for user - Primary User
You can also use Primary User by joining the Inv_AeX_AC_Primary_User table. This table will list the primary user per month, so you'd need to set the month. An easy way to do that is to add in the WHERE section of the query:
[Inv_AeX_AC_Primary_User].[Month] = (select datename(month, getdate()))