With this basic report you will be able to monitor any new applications installed and registrered in Add/Remove programs during the last 7 days on a client computer.
Thanks to Claus Codam for helping out
The SQL code
SELECT TOP (100) PERCENT
dbo.v_R_System.Name0,
dbo.v_GS_ADD_REMOVE_PROGRAMS.DisplayName0,
dbo.v_GS_ADD_REMOVE_PROGRAMS.InstallDate0,
DATEDIFF(Day, CONVERT(date,dbo.v_GS_ADD_REMOVE_PROGRAMS.InstallDate0), GETDATE()) AS [days since installed]
FROM
dbo.v_R_System INNER JOIN
dbo.v_GS_ADD_REMOVE_PROGRAMS ON
dbo.v_R_System.ResourceID = dbo.v_GS_ADD_REMOVE_PROGRAMS.ResourceID
WHERE
(SELECT ISDATE(dbo.v_GS_ADD_REMOVE_PROGRAMS.InstallDate0)) = 1
GROUP BY
dbo.v_R_System.Name0,
dbo.v_GS_ADD_REMOVE_PROGRAMS.DisplayName0,
dbo.v_GS_ADD_REMOVE_PROGRAMS.InstallDate0,
DATEDIFF(Day, CONVERT(date,dbo.v_GS_ADD_REMOVE_PROGRAMS.InstallDate0), GETDATE())
HAVING
(
(CASE WHEN (ISDATE(dbo.v_GS_ADD_REMOVE_PROGRAMS.InstallDate0))=1 THEN
(DATEDIFF(Day, CONVERT(date,dbo.v_GS_ADD_REMOVE_PROGRAMS.InstallDate0), GETDATE()))
ELSE 500
END) > 0 AND
(CASE WHEN (ISDATE(dbo.v_GS_ADD_REMOVE_PROGRAMS.InstallDate0))=1 THEN
(DATEDIFF(Day, CONVERT(date,dbo.v_GS_ADD_REMOVE_PROGRAMS.InstallDate0), GETDATE()))
ELSE 500
END) < 7
)
SELECT TOP (100) PERCENT dbo.v_R_System.Name0, dbo.v_GS_ADD_REMOVE_PROGRAMS.DisplayName0, dbo.v_GS_ADD_REMOVE_PROGRAMS.InstallDate0, DATEDIFF(Day, CONVERT(date,dbo.v_GS_ADD_REMOVE_PROGRAMS.InstallDate0), GETDATE()) AS [days since installed] FROM dbo.v_R_System INNER JOIN dbo.v_GS_ADD_REMOVE_PROGRAMS ON dbo.v_R_System.ResourceID = dbo.v_GS_ADD_REMOVE_PROGRAMS.ResourceID WHERE (SELECT ISDATE(dbo.v_GS_ADD_REMOVE_PROGRAMS.InstallDate0)) = 1 GROUP BY dbo.v_R_System.Name0, dbo.v_GS_ADD_REMOVE_PROGRAMS.DisplayName0, dbo.v_GS_ADD_REMOVE_PROGRAMS.InstallDate0, DATEDIFF(Day, CONVERT(date,dbo.v_GS_ADD_REMOVE_PROGRAMS.InstallDate0), GETDATE()) HAVING ( (CASE WHEN (ISDATE(dbo.v_GS_ADD_REMOVE_PROGRAMS.InstallDate0))=1 THEN (DATEDIFF(Day, CONVERT(date,dbo.v_GS_ADD_REMOVE_PROGRAMS.InstallDate0), GETDATE())) ELSE 500 END) > 0 AND (CASE WHEN (ISDATE(dbo.v_GS_ADD_REMOVE_PROGRAMS.InstallDate0))=1 THEN (DATEDIFF(Day, CONVERT(date,dbo.v_GS_ADD_REMOVE_PROGRAMS.InstallDate0), GETDATE())) ELSE 500 END) < 7 )
The Report
Great site, i am happy I found it..
I am trying to figure out a way to find a if a specific service is NOT running, for example, if I have any windows 2003 machines that do not have SNMP installed?
Hi Amnon,
For a solution to your question check out this post written by Sherry Kissinger – http://myitforum.com/cs2/blogs/skissinger/archive/2009/04/25/hardware-inventory-customization-only-specific-services.aspx
I have tried using the audit software sql code but get these errors
Server: Msg 242, Level 16, State 3, Line 1
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
Server: Msg 241, Level 16, State 1, Line 1
Conversion failed when converting datetime from character string.
any ideas on how this can be solved
Hi,
Send me a mail and I will return the report.mof file for you to import
Hi kent Did you get my mail?
I’ve tried this but getting the error:
Conversion failed when converting datetime from character string
Any tweaks needed if the server has a non-US time/date format?
Hi,
the problem is the way data is stored in the db. I just found a few examples to illustrate it. I will try and find a work around.
10/21/2009
12/19/2008
197011
197011
20030519
20031204
20031205
Hi Kent,
I got same error as mentioned above as “Conversion failed when converting datetime from character string”
Is there any way to fix this ?
Regards,
Hi Kent,
I get the above error mentioned above is there a fix for it?
Thanks
The report has been updated and will eliminate the errors you have seen
Could you modify the report to show just the count for software installed in the last 7 days. Example: Office 2007 – 34 installs
When I execute this query I am getting this error message
Msg 208, Level 16, State 1, Line 1
Invalid object name ‘dbo.v_R_System’
Awesome, thanks for the info.
Do you think there is any way to filter out what was installed by a task sequence?
I am more interested in unapproved software installs.
Change “date” to “Datetime” to avoid: “Type date is not a defined system type. Error Number: -2147217900”
http://social.technet.microsoft.com/Forums/en-US/configmgrreporting/thread/0c06a469-db57-4f85-8c6a-2620f6365d31/
is there a way to do this with status filter rules to send generate email for service desk each time software is installed?
This report doesn’t give the actual data. It shows if any update is installed for specific software as a software installed.
For example..in the result we can see that ..many office products which is wrong.
How to avoid this issue.??
Nice Post Your Blog Gained A New Fan 415255703 of times !! Great Post 🙂