It's so much cooler to do it this way ;-) http://myitforum.com/myitforumwp/2013/01/07/tracking-automatic-software-removals/
________________________________ John Marcum Sr. Desktop Architect Bradley Arant Boult Cummings LLP ________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of Ranvir singh Sent: Wednesday, November 13, 2013 1:58 PM To: [email protected] Subject: [mssms] Creating Uninstall Collections Using Software Metering http://www.myitforum.com/articles/8/view.asp?id=10909 Showing as a Typo error after replacing the Rule ID as well SELECT DISTINCT SMS_R_System.* FROM SMS_G_System_SoftwareFile INNER JOIN SMS_R_System ON SMS_G_System_SoftwareFile.ResourceID = SMS_R_System.ResourceID INNER JOIN SMS_MeteredFiles ON SMS_G_System_SoftwareFile.FileID = SMS_MeteredFiles.MeteredFileID INNER JOIN SMS_MeteredProductRule ON SMS_MeteredProductRule.RuleID = SMS_MeteredFiles.RuleID WHERE SMS_MeteredFiles.RuleID = 6 AND DateDiff(day, SMS_G_System_SoftwareFile.ModifiedDate, GetDate()) > 30 AND DateDiff(day, SMS_MeteredProductRule.LastUpdateTime, GetDate()) > 30 AND SMS_R_System.OperatingSystemNameAndVersion LIKE '%Workstation%' AND SMS_G_System_SoftwareFile.ResourceID NOT IN ( SELECT DISTINCT SMS_MonthlyUsageSummary.ResourceID FROM SMS_MonthlyUsageSummary INNER JOIN SMS_MeteredFiles ON SMS_MonthlyUsageSummary.FileID = SMS_MeteredFile.MeteredFileID WHERE DateDiff(day, SMS_MonthlyUsageSummary.LastUsage, GetDate()) < 90 AND SMS_MeteredFiles.RuleID = 6 ) ________________________________ Confidentiality Notice: This e-mail is from a law firm and may be protected by the attorney-client or work product privileges. If you have received this message in error, please notify the sender by replying to this e-mail and then delete it from your computer. ________________________________ Confidentiality Notice: This e-mail is from a law firm and may be protected by the attorney-client or work product privileges. If you have received this message in error, please notify the sender by replying to this e-mail and then delete it from your computer.

