CIM_FileSpecification class

The CIM_FileSpecification class represents a file that is either on or off of the system. The file is located in the directory identified by the CIM_DirectorySpecificationFile association. The Invoke method uses the information to check for the file's existence. Note that properties with a Null value are not checked.

Important  The DMTF (Distributed Management Task Force) CIM (Common Information Model) classes are the parent classes upon which WMI classes are built. WMI currently supports only the CIM 2.x version schemas.

The following syntax is simplified from Managed Object Format (MOF) code and includes all inherited properties. Properties are listed in alphabetic order, not MOF order.

Syntax

class CIM_FileSpecification
{
  string   Caption;
  string   CheckID;
  boolean  CheckMode;
  uint32   CheckSum;
  uint32   CRC1;
  uint32   CRC2;
  datetime CreateTimeStamp;
  string   Description;
  uint64   FileSize;
  string   MD5Checksum;
  string   Name;
  string   SoftwareElementID;
  uint16   SoftwareElementState;
  uint16   TargetOperatingSystem;
  string   Version;
};

Members

The CIM_FileSpecification class has these types of members:

Methods

The CIM_FileSpecification class has these methods.

MethodDescription
Invoke

Evaluates a particular check. Not implemented by WMI.

 

Properties

The CIM_FileSpecification class has these properties.

Caption
Data type: string
Access type: Read-only

Short textual description of the object. This property is inherited from CIM_Check.

CheckID
Data type: string
Access type: Read-only

Identifier used in conjunction with other keys to uniquely identify the check. This property is inherited from CIM_Check.

CheckMode
Data type: boolean
Access type: Read-only

If True, the condition is expected to exist in the environment (for example, if a file is on a system, the Invoke method should return True). If False, the condition should not exist (for example, if a file is not on a system, the Invoke method should return False). This property is inherited from CIM_Check.

CheckSum
Data type: uint32
Access type: Read-only

Value calculated as the 16-bit sum of the file's first 32 bytes.

CRC1
Data type: uint32
Access type: Read-only

CRC value calculated using the middle 512 KB.

CRC2
Data type: uint32
Access type: Read-only

CRC value for the middle 512 KB of the file, modulo 3.

CreateTimeStamp
Data type: datetime
Access type: Read-only

File creation date and time.

Description
Data type: string
Access type: Read-only

Description of the objects. This property is inherited from CIM_Check.

FileSize
Data type: uint64
Access type: Read-only

Size of the file, in bytes.

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

MD5Checksum
Data type: string
Access type: Read-only

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 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 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". For more information about implementing the MD5 algorithm, see RFC 1321.

Name
Data type: string
Access type: Read-only

Name of the file, or the name of the file with a directory prefix. This property is inherited from CIM_Check.

SoftwareElementID
Data type: string
Access type: Read-only

Identifier for the software element. This property is inherited from CIM_Check.

SoftwareElementState
Data type: uint16
Access type: Read-only

State of a software element This property is inherited from CIM_Check.

ValueMeaning
0

Deployable

Describes the details necessary for successful distribution and the details (conditions and actions) required to create a software element in the installable state (that is, the next state).

1

Installable

Describes the details necessary for successful installation and the details (conditions and actions) required to create a software element in the executable state (that is, the next state).

2

Executable

Describes the details necessary for successful execution and the details (conditions and actions) required to create a software element in the running state (that is, the next state).

3

Running

Describes the details necessary to monitor and operate on a start element.

 

TargetOperatingSystem
Data type: uint16
Access type: Read-only

Target operating system of the software element. This property is inherited from CIM_Check.

ValueMeaning
0

Unknown

1

Other

2

Mac OS

3

ATT UNIX

4

DGUX

5

DECNT

6

Digital UNIX

7

Open VMS

8

HP-UX

9

AIX

10

MVS

11

OS400

12

OS/2

13

Microsoft Virtual Machine (VM) for Java

14

MSDOS

15

Windows 3.x

16

Windows 95

17

Windows 98

18

Windows NT

19

Windows CE

20

NCR 3000

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

A Series

33

Tandem NSK

34

Tandem NT

35

BS2000/OSD

36

Linux

37

Lynx

38

Xenix

39

VM/ESA

40

Interactive UNIX

41

BSD UNIX

42

FreeBSD

43

NetBSD

44

GNU Hurd

45

Mac OS 9

46

Mach Kernel

47

Inferno

48

QNX

49

EPOC

50

IxWorks

51

VxWorks

52

MiNT

53

BeOS

54

HP MPE

55

NEXTSTEP

56

Palm OS

57

Rhapsody

58

Windows 2000

59

Dedicated

60

VSE

61

TPF

 

Version
Data type: string
Access type: Read-only

Version of the operation.

The version of the operation should be in one of the following forms:

  • <major>.<minor>.<revision>
  • <major>.<minor><letter><revision>

This property is inherited from the CIM_Check class.

Remarks

WMI does not implement this class. For classes derived from CIM_FileSpecification, see Win32 Classes.

This documentation is derived from the CIM class descriptions published by the DMTF. Microsoft may have made changes to correct minor errors, conform to Microsoft SDK documentation standards, or provide more information.

Examples

For script code examples, see WMI Tasks for Scripts and Applications and the TechNet ScriptCenter Script Repository.

For C++ code examples, see WMI C++ Application Examples.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003

Namespace

\root\CIMV2

MOF

CIMWin32.mof

DLL

CIMWin32.dll

 

 

Show:
© 2014 Microsoft