none
Query File name and path without exact location on SCCM2007

    Question

  • I am trying to find a file name and path...I am able to generate a list of machines with the file by using 

    select distinct SMS_R_System.Name 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 like "%FilenameExample%"

    I am struggling with the part of also querying the file path, Ive seen several threads on querying for this information if you know the file path.

    The issue is there are old installs and newer installs out there which would have wrote to different locations

    I assume I would use something like SMS_G_System_SoftwareFile.File Path I just dont know how to tie it all together
    • Edited by ChristianPR Wednesday, March 06, 2013 3:26 PM
    Wednesday, March 06, 2013 3:19 PM

Answers

  •  My apologies for the late response, I actually worded the question horribly.  I figured out what I was doing wrong....I was querying for it specifically instead of changing the outcome to show the file path of what I was querying.  Thank you for your response
    • Marked as answer by ChristianPR Wednesday, March 13, 2013 1:04 PM
    • Unmarked as answer by ChristianPR Wednesday, March 13, 2013 1:04 PM
    • Marked as answer by ChristianPR Wednesday, March 13, 2013 1:05 PM
    Wednesday, March 13, 2013 1:03 PM

All replies

  • Are you looking for a report?  I don't use the +queries node in the console to create a report.

    If you go into sql Management Studio, and connect to your SMS_xyz site code database, something like this.

    select
      s1.Netbios_Name0 [Computer Name],
      sf.FileName [FileName],
      sf.FilePath [File Path]
    from v_R_System s1
      join v_GS_SoftwareFile sf on sf.ResourceID=s1.ResourceID
    where sf.FileName like '%FileNameExample%'
    order by s1.netbios_name0

     


    Standardize. Simplify. Automate.

    Thursday, March 07, 2013 5:35 PM
    Moderator
  •  My apologies for the late response, I actually worded the question horribly.  I figured out what I was doing wrong....I was querying for it specifically instead of changing the outcome to show the file path of what I was querying.  Thank you for your response
    • Marked as answer by ChristianPR Wednesday, March 13, 2013 1:04 PM
    • Unmarked as answer by ChristianPR Wednesday, March 13, 2013 1:04 PM
    • Marked as answer by ChristianPR Wednesday, March 13, 2013 1:05 PM
    Wednesday, March 13, 2013 1:03 PM