SCCM query for file path
For some reason, I am unable to get a query to work for an exe located at a specific file path. I can do a query for the exe itself and get more results than I want, but I need to find it in a specific path. The path and file name is: c:\Program Files\NBSI\sysdll\sysserv.exe. Thanks!
May 6th, 2010 12:59am

Could you paste the query here. What error or problems are you seeing when you do the query. http://www.sccm-tools.com http://sms-hints-tricks.blogspot.com
Free Windows Admin Tool Kit Click here and download it now
May 6th, 2010 4:43am

I assume you want to see all the computers that have that file in that path? SELECT dbo.v_R_System.Name0, dbo.v_GS_SoftwareFile.FileName, dbo.v_GS_SoftwareFile.FilePath FROM dbo.v_R_System INNER JOIN dbo.v_GS_SoftwareFile ON dbo.v_R_System.ResourceID = dbo.v_GS_SoftwareFile.ResourceID WHERE (dbo.v_GS_SoftwareFile.FileName = 'sysserv.exe') AND (dbo.v_GS_SoftwareFile.FilePath = c:\Program Files\NBSI\sysdll\') John Marcum | http://myitforum.com/cs2/blogs/jmarcum |
May 6th, 2010 8:49pm

After mucking around for a while, I was finally able to get it working. I also needed to do a version exclusion so here's my working solution in case anyone else is having the same problem: select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_SoftwareFile on SMS_G_System_SoftwareFile.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SoftwareFile.FileName = "sysserv.exe" and SMS_G_System_SoftwareFile.FileVersion != "2, 6, 1, 8" and SMS_G_System_SoftwareFile.FilePath = "C:\\Program Files\\NBSI\\sysdll\\" and SMS_R_System.Name like "CVB-______"
Free Windows Admin Tool Kit Click here and download it now
May 10th, 2010 11:38pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics