Share via


Win32_FileSpecification class

The Win32_FileSpecification WMI class represents a source file with its various attributes, ordered by a unique, nonlocalized identifier. For uncompressed files, the File property is ignored, and the FileName property is used for both source and destination file name. You must set the Uncompressed bit of the Attributes property for any file that is not compressed in a cabinet.

Note

For more information about support or requirements for installation on a specific operating system, see Operating System Availability of WMI Components.

The following syntax is simplified from Managed Object Format (MOF) code and includes all inherited properties.

Syntax

[Provider("MSIProv"), Dynamic]
class Win32_FileSpecification : CIM_FileSpecification
{
  uint16   Attributes;
  string   Caption;
  string   CheckID;
  boolean  CheckMode;
  uint32   CheckSum;
  uint32   CRC1;
  uint32   CRC2;
  datetime CreateTimeStamp;
  string   Description;
  string   FileID;
  uint64   FileSize;
  string   Language;
  string   MD5CheckSum;
  string   Name;
  uint16   Sequence;
  string   SoftwareElementID;
  uint16   SoftwareElementState;
  uint16   TargetOperatingSystem;
  string   Version;
};

Members

The Win32_FileSpecification class has these types of members:

Methods

The Win32_FileSpecification class has these methods.

Method Description
Invoke Evaluates a particular check. The details of how the method evaluates a particular check in a CIM context are described by the nonabstract CIM_Check subclasses.

Properties

The Win32_FileSpecification class has these properties.

Attributes

Data type: uint16

Access type: Read-only

Integer that contains bit flags representing file attributes.

Value Meaning
1 (0x1)
Read Only.
2 (0x2)
Hidden.
4 (0x4)
System.
256 (0x100)
Split - the file is split between two or more compression cabinets.
512 (0x200)
Vital - the file is vital for the proper operation of the component to which it belongs.
4096 (0x1000)
Permanent - the file is not removed on uninstall.
8192 (0x2000)
Uncompressed - the file is uncompressed on the source media.
16384 (0x4000)
Patch (reserved for future use).
32768 (0x8000)
PatchSourceIgnore - the file can be ignored during a patch upgrade if it is run-from-source.

Caption

Data type: string

Access type: Read-only

Short textual description of the object.

CheckID

Data type: string

Access type: Read-only

Identifier used in conjunction with other keys to uniquely identify the check.

CheckMode

Data type: boolean

Access type: Read-only

Condition is expected to exist in the environment. When True, the condition is expected to exist (for example, a file is expected to be on a system), so the Invoke method is expected to return True.

CheckSum

Data type: uint32

Access type: Read-only

Checksum calculated as the 16-bit sum of the first 32 bytes of the file.

CRC1

Data type: uint32

Access type: Read-only

CRC value calculated using the middle 512 kilobytes.

CRC2

Data type: uint32

Access type: Read-only

CRC value for the middle 512 kilobytes with a offset modulo 3 to the start of the file of zero.

CreateTimeStamp

Data type: datetime

Access type: Read-only

Date the file was created.

Description

Data type: string

Access type: Read-only

Description of the object.

FileID

Data type: string

Access type: Read-only

Unique key that identifies a file within the scope of a product.

FileSize

Data type: uint64

Access type: Read-only

Size of the file.

For more information about using uint64 values in scripts, see Scripting in WMI.

Language

Data type: string

Access type: Read-only

Decimal language identifiers that are comma-separated if there is more than one.

MD5CheckSum

Data type: string

Access type: Read-only

Algorithm for computing a 128-bit checksum for any file or object. The probability of two different files producing the same MD5 checksum is small (about 1 in 2^64), and the MD5 checksum of a file can be used to construct a reliable content identifier that is likely to uniquely identify the file. The reverse is also true. If two files have the same MD5 checksum, it is 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".

Name

Data type: string

Access type: Read-only

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

Sequence

Data type: uint16

Access type: Read-only

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

SoftwareElementID

Data type: string

Access type: Read-only

Identifier for the software element.

SoftwareElementState

Data type: uint16

Access type: Read-only

State of a software element.

Value Meaning
1
Deployable
2
Installable
3
Executable
4
Running

TargetOperatingSystem

Data type: uint16

Access type: Read-only

Target operating system of the software element. The following list identifies the list of possible values for this property.

Value Meaning
0
Unknown
1
Other
2
MACOS
3
ATTUNIX
4
DGUX
5
DECNT
6
Digital Unix
7
OpenVMS
8
HPUX
9
AIX
10
MVS
11
OS400
12
OS/2
13
JavaVM
14
MSDOS
15
WIN3x
16
WIN95
17
WIN98
18
WINNT
19
WINCE
20
NCR3000
21
NetWare
22
OSF
23
DC/OS
24
Reliant UNIX
25
SCO UnixWare
26
SCO OpenServer
27
Sequent
28
IRIX
29
Solaris
30
SunOS
31
U6000
32
ASERIES
33
TandemNSK
34
TandemNT
35
BS2000
36
LINUX
37
Lynx
38
XENIX
39
VM/ESA
40
Interactive UNIX
41
BSDUNIX
42
FreeBSD
43
NetBSD
44
GNU Hurd
45
OS9
46
MACH Kernel
47
Inferno
48
QNX
49
EPOC
50
IxWorks
51
VxWorks
52
MiNT
53
BeOS
54
HP MPE
55
NextStep
56
PalmPilot
57
Rhapsody

Version

Data type: string

Access type: Read-only

Version of the software element. Values should be in the form [Major].[Minor].[Revision] or [Major].[Minor][letter][revision].

Remarks

The Win32_FileSpecification class is derived from CIM_FileSpecification.

Requirements

Minimum supported client
Windows XP
Minimum supported server
Windows Server 2003
Namespace
Root\CIMV2
MOF
Msi.mof
DLL
Msiprov.dll

See also

Installed Applications Classes