- WMI Library -
WMI Libraly > Win32_FileSpecification Class

Win32_FileSpecification Class

Each instance of this class represents a source file with it's various attributes, ordered by a unique, non-localized identifier. For uncompressed files, the File property is ignored, and the FileName column is used for both the source and destination file name. You must set the 'Uncompressed' bit of the Attributes column for any file that is not compressed in a cabinet.
Namespace value is root/CIMV2.
WMI Provider value is MSIProv.


Properties

  • Attributes
  • Integer containing bit flags representing file attributes (with the decimal value of each bit position in parentheses). See the remarks below for more information: Bit 0: Read Only (1) Bit 1: Hidden (2) Bit 2: System (4) Bit 8: Split (256) - the file is split between two or more compression cabinets Bit 9: Vital (512) - this file is vital for the proper operation of the component to which it belongs Bit 12: Permanent (4096) - the file will not be removed on uninstall Bit 13: Uncompressed (8192) - the file is uncompressed on the source media Bit 14: Patch (16384) (reserved for future use) Bit 15: PatchSourceIgnore (32768) - the file can be ignored during a patch upgrade if it is run-from-source

  • Caption
  • Not applicable.

  • CheckID
  • An identifier used in conjunction with other keys to uniquely identify the check

  • CheckMode
  • The CheckMode property is used to indicate whether the condition is expected to exist or not exist in the environment. When the value is True, the condition is expected to exist (e.g., a file is expected to be on a system) so invoke() is expected to return True. When the value is False, the condition is not expect to exist (e.g., a file is not to be on a system) so invoke is expected to return false

  • CheckSum
  • The Checksum property is a checksum calculated as the 16-bit sum of the first 32 bytes of the file.

  • CRC1
  • The CRC1 property is the CRC value calculated using the middle 512K bytes.

  • CRC2
  • The CRC2 is the CRC value for the middle 512K bytes with a offset modulo 3 to the start of the file of zero.

  • CreateTimeStamp
  • The creation date and time of the file.

  • Description
  • A description of the objects.

  • FileID
  • A unique key which identifies a file within the scope of a product.

  • FileSize
  • Not applicable.

  • Language
  • List of decimal language Ids, comma-separated if more than one.

  • MD5Checksum
  • The MD5 algorithm is a well-known algorithm for computing a 128-bit checksum for any file or object. The likelihood of two different files producing the same MD5 checksum is very small (about 1 in 2^64), and as such, the MD5 checksum of a file can be used to construct a reliable content identifier that is very likely to uniquely identify the file. The reverse is also true. If two files have the same MD5 checksum, it is very likely that the files are identical. For purposes of MOF specification of the MD5 property, the MD5 algorithm always generates a 32 character string. For example: The string abcdefghijklmnopqrstuvwxyz generates the string c3fcd3d76192e4007dfb496cca67e13b. See http://www. rsa.com/pub/rfc1321.txt for details on the implementation of the MD5 algorithm.

  • Name
  • Either the name of the file or the name of the file with a directory prefix.

  • Sequence
  • Sequence with respect to the media images; order must track cabinet order.

  • SoftwareElementID
  • This is an identifier for this software element.

  • SoftwareElementState
  • The software element state of a software element

  • TargetOperatingSystem
  • The target operating system of the this software element.

  • Version
  • Version should be in the form .. or .


    Methods

  • Invoke
  • The invoke method is to evaluate a particular check. The details of how the method evaluates a particular check in a CIM context is described by the non-abstract CIM_Check sub classes. The results of the method are based on the return value. - A 0 (zero) is returned if the condition is satisfied. - A 1 (one) is returned if the method is not supported. - Any other value indicates the condition is not satisfied.


    Example WQL

    SELECT * FROM Win32_FileSpecification
    About this site information

    This contents is created by WMI having class information.
    WMI Environment is Windows Server 2008 R2 Enterprise Edition.

    This link is Microsoft documents for "Managing Windows with WMI".
    That is VB(Visual Basic) scripting sample.
    This link is Microsoft documents for "Advanced Programming Topics in WMI .NET".
    That is VB.net(Visual Basic .net) scripting sample.

    - WMI Library -
    http://library.wmifun.net/

    WMI useful by VB,VB.Net,VC,VC.Net,VC#.Net,VBS(WSH),PowerShell for PC asset management, system monitoring and collecting hardware and software inventory.

    This website is created by Toh.
    Copyright(C) 1997-2016 WMI Fun !!. All rights reserved.
    ^ Go to the top...