Share via


SMS_G_System_SoftwareFile

The SMS_G_System_SoftwareFile WMI class contains information about all software files that were inventoried on the client computer.

The following syntax is simplified from MOF code and includes all inherited properties.

Class SMS_G_System_SoftwareFile : SMS_G_System
{
  datetime CreationDate;
  uint32 FileCount;
  string FileDescription;
  uint32 FileID;
  string FileName;
  uint32 FileSize;
  string FileVersion;
  datetime ModifiedDate;
  uint32 ProductId;
  uint32 ResourceID;
};

Properties

  • CreationDate
    Data type: datetime
    Access type: Read-only

    Date and time the file was created.

  • FileCount
    Data type: uint32
    Access type: Read-only

    Number of instances of this file found on the client.

  • FileDescription
    Data type: string
    Access type: Read-only

    Description from the description resource string. This value is blank for unknown files.

  • FileID
    Data type: uint32
    Access type: Read-only
    Qualifiers: Key

    SMS-supplied identifier that uniquely identifies the file.

  • FileName
    Data type: string
    Access type: Read-only

    Name of the file.

  • FileSize
    Data type: uint32
    Access type: Read-only

    Size of the file in bytes.

  • FileVersion
    Data type: string
    Access type: Read-only

    Version from the version resource string. This value is blank for unknown files.

  • ModifiedDate
    Data type: datetime
    Access type: Read-only

    Date and time the file was last modified.

  • ProductId
    Data type: uint32
    Access type: Read-only

    Associates this file with a software product from the SMS_G_System_SoftwareProduct class. A value of zero indicates this file is not associated with a known software product (it is an unknown file). Instances whose ProductId value is zero are identical to instances found in SMS_G_System_UnknownFile.

  • ResourceID
    Data type: uint32
    Access type: Read-only
    Qualifiers: Key

    SMS-supplied identifier that uniquely identifies a resource (SMS client). A ResourceID value is not unique outside the site.

Remarks

You should use SMS_G_System_SoftwareFile for all queries involving inventoried files. This class contains both known product files and unknown product files — known product files contain company and product resource information or are related to known product files.

Although SMS_G_System_UnknownFile contains the same unknown file information that is found in SMS_G_System_SoftwareFile, there is no advantage to querying against SMS_G_System_UnknownFile for unknown product files. The following query returns all unknown product files from SMS_G_System_SoftwareFile:

SELECT * FROM SMS_G_System_SoftwareFile
WHERE ProductId = 0

The following query returns all known product files and their product information:

SELECT * FROM SMS_G_System_SoftwareFile swf
JOIN SMS_G_System_SoftwareProduct swp ON swf.ProductId = swp.ProductId
AND swf.ResourceID = swp.ResourceID

The Software Inventory Agent inventories those file types identified in the site control file. To update the file types SMS inventories:

  1. Query the site control item SMS_SCI_ClientComp for the instance whose value for ClientComponentName is Software Inventory Agent.

  2. Loop through its embedded property list.

    When the value for PropertyName is Inventoriable Types, update the comma-delimited list of file types (extensions) in the Value2 property.

    When the value for PropertyName is Inventory Schedule, update the interval string in the Value2 property. For details on creating an interval string, see the example for the WriteToString method.

    When the value for PropertyName is Report Options, update the reporting options value in the Value property. You must specify at least one reporting option for software inventory to be collected. The following table lists the reporting options.

    Reporting option Description
    Product version information.
    Bit 0.
    Inventories products that contain company and product resource information.
    Files associated with known products.
    Bit 1.
    Inventories files associated with products that contain company and product resource information. For example, Wwintl32.dll is inventoried because it is associated with Microsoft Word.

    Only set this bit if the product version information reporting option is selected.

    Files not associated with known products.
    Bit 2.
    Inventories files that do not include company and product resource information (unknown files).
  3. Update the site control file with your changes.

For information on updating the site control file, see the example in Managing Site Control Configuration.

Note  Collecting inventory information for some file types, such as DLL files, can generate a large volume of network traffic and substantially increase the size of the SMS database. For this reason, test any changes you make in a test environment before implementing in a production environment.

See Also

Managing Site Control Configuration, Resource Management Classes, SMS_G_System_CollectedFile, SMS_G_System_LastSoftwareScan, SMS_G_System_SoftwareProduct, SMS_G_System_UnknownFile