One thing that is always in my list of saved SQL queries is the ability to search for a piece of software via Add Remove Programs. This is found in the table [Inv_AddRemoveProgram].
With this you can find many objects and open up many reporting possibilities.
I see many requests on the forums for how to find a piece of software. With the following Article it should meet more than your needs from the Application Name to How many of a specific version and finally what machines it is installed on.
SQL Code:
DISTINCT VERSIONS
-- shows count of all versions on that host
Select Distinct t0.[DisplayName] as ' Application', t0.[displayVersion] as 'Version'
From [Inv_AddRemoveProgram] t0
join Inv_AeX_AC_Identification t1 on t0._ResourceGuid = t1._ResourceGuid
--Change below line to find app and also you can specify a version to show just them
where [displayName] like '%AppName%' and t0.DisplayVersion like '%'
order by t0.[DisplayName], t0.[displayVersion]
Software Count Code:
-- shows count of all versions
Select t0.[DisplayName] as ' Application', t0.[displayVersion] as 'Version', Count(t0.[displayName]) as 'Count'
From [Inv_AddRemoveProgram] t0
--Change below line to find app
where [displayName] like '%AppName%'
Group by t0.[displayName], t0.[displayVersion]
Software by Machine Code:
-- shows count of all versions on that host
Select Distinct t1.Name, t0.[DisplayName] as ' Application', t0.[displayVersion] as 'Version', t1._ResourceGuid
From [Inv_AddRemoveProgram] t0
join Inv_AeX_AC_Identification t1 on t0._ResourceGuid = t1._ResourceGuid
--Change below line to find app and also you can specify a version to show just them
where [displayName] like '%AppName%' and t0.DisplayVersion like '%AppVer%'
order by t1.Name
Reports:
Report for DISTINCT VERSIONS
- From Report section of the Console right click and choose New> Report> SQL Report
- Click Report Parameters Tab
- Click Add> New Paramater
- Name: AppName
- Description: Software Name:
- Default Value: %
- Value Provider: Click dropdown and choose Basic Parameter Value Edit Control
- Click Ok
- Click Data Source Tab
- Click Query Parameters Tab
- Click Add and choose Software Name:
- Click Parameterised Query and paste in SQL code for Distinct versions from above
- Give it a name: Distinct Software and Versions
- Report can now be ran and you can select software name to shorten the list
Report for Software Count Code
- From Report section of the Console right click and choose New> Report> SQL Report
- Click Report Parameters Tab
- Click Add> New Paramater
- Name: AppName
- Description: Software Name:
- Default Value: %
- Value Provider: Click dropdown and choose Basic Parameter Value Edit Control
- Click Ok
- Click Data Source Tab
- Click Query Parameters Tab
- Click Add and choose Software Name:
- Click Parameterised Query and paste in SQL code for Software Count from above
- Give it a name: Software Count
- Report can now be ran and you can select software name to shorten the list
Next report utilizes the Distinct Software and Version report
Software by Machine:
- From Report section of the Console right click and choose New> Report> SQL Report
- Click Report Parameters Tab
- Click Add> New Paramater
- Name: AppName
- Description: Software Name:
- Default Value: %
- Value Provider: Click dropdown and choose Basic Parameter Value Edit Control
- Click Ok
- Click Add> New Paramater
- Name: AppVer
- Description: Application Version:
- Default Value: %
- Value Provider: Click dropdown and choose Basic Parameter Value Edit Control
- Click Ok
- Click Data Source Tab
- Click Query Parameters Tab
- Click Add and choose Software Name:
- Click Add and choose Application Version:
- Click Parameterised Query and paste in SQL code for Software by Machine from above
- Click Drilldowns Tab
- Click Remove
- Click Add
- Name: ShowContextMenu
- Event: choose Right Click
- Performs: Show Context Menu
- Action Configuration: select _ResourceGuid
- Check off Display additional resource tool items in the menu
- Give the report a name: Software by Machine
- Report can now be ran and you can select software name to shorten the list. Last section (ShowContextMenu) allows right click menu for the PC
Hope these 3 reports can help you too.
You can take this even further by creating a report that shows an application and all versions.
Then take that and use that version field as a dynamic dropdown list.
We do this for certain Applications. It is a bit more of a setup as you have to create 2 reports for each app but in the long run when a new version inventories in it will automatically get added to the Version dropdown list.
If you would like to see that one done let me know and I will add it too.
Thanks for viewing...
TeleFragger