donderdag 5 februari 2009

Find a certian directory on a machine.

We were facing a problem on the systems that a certain software package was not installed on the machine. We could only find the "bad install's" by looking on the machine for a directory that didnt exist's.

The Query is looking in the add remove programs for "Borland CaliberRM 2006" and the bad install's were the host's that didnt have the directory "c:\\program files\\borland\\java"

You can use this query to modify it yourself. Just replace the names.

-----------------------------------------------------------------------------------

select distinct SMS_R_System.Name, SMS_G_System_COMPUTER_SYSTEM.UserName, SMS_R_System.ResourceId from SMS_R_System inner join SMS_G_System_SoftwareFile on SMS_G_System_SoftwareFile.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_R_System.ResourceId in (select SMS_R_System.Resourceid from SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS ARP on ARP.ResourceID = SMS_R_System.ResourceId where ARP.DisplayName like "Borland CaliberRM 2006") and SMS_G_System_SoftwareFile.FilePath not like "c:\\program files\\borland\\java" order by SMS_R_System.Name

-----------------------------------------------------------------------------------

Geen opmerkingen:

Een reactie posten