Platform SDK: Windows Management Instrumentation

Win32_NTEventlogFile

The Win32_NTEventlogFile WMI class represents a logical file or directory of Windows NT events.

Properties

The following table lists the properties for Win32_NTEventlogFile.

Property Description
AccessMask array (uint32)
Read-only

List of access rights to the given file or directory held by the user or group on whose behalf the instance is returned. This property is only supported under Windows NT and Windows 2000. On Windows 98 and on Windows NT/Windows 2000 FAT volumes, the FULL_ACCESS value is returned instead, indicating no security has been set on the object.

Values are:
0 = FILE_READ_DATA (file) or FILE_LIST_DIRECTORY (directory)
1 = FILE_WRITE_DATA (file) or FILE_ADD_FILE (directory)
2 = FILE_APPEND_DATA (file) or FILE_ADD_SUBDIRECTORY (directory)
3 = FILE_READ_EA
4 = FILE_WRITE_EA
5 = FILE_EXECUTE (file) or FILE_TRAVERSE (directory)
6 = FILE_DELETE_CHILD (directory)
7 = FILE_READ_ATTRIBUTES
8 = FILE_WRITE_ATTRIBUTES
16 = DELETE
17 = READ_CONTROL
18 = WRITE_DAC
19 = WRITE_OWNER
20 = SYNCHRONIZE

Archive Boolean
Read-only

Indicates whether the file should be archived.

Caption string
Read-only

Short description (one-line string) of the object.

Compressed Boolean
Read-only

Indicates whether the file is compressed.

CompressionMethod string
Read-only

Algorithm or tool used to compress the logical file. If it is not possible (or not desired) to describe the compression scheme (perhaps because it is not known), use the following words: "Unknown" to represent that it is not known whether the logical file is compressed or not; "Compressed" to represent that the file is compressed but either its compression scheme is not known or not disclosed; and "Not Compressed" to represent that the logical file is not compressed.

CreationClassName string
Read-only
Qualifiers: Key, MaxLen(256)

Name of the first concrete class to appear in the inheritance chain used in the creation of an instance. When used with the other key properties of the class, the property allows all instances of this class and its subclasses to be uniquely identified.

CreationDate datetime
Read-only

File creation date.

CSCreationClassName string
Read-only

Class of the computer system.

CSName string
Read-only

Name of the computer system.

Description string
Read-only

Description of the object.

Drive string
Read-only

Drive letter (including colon) of the file.

Example: "c:"

EightDotThreeFileName string
Read-only

DOS-compatible file name for this file.

Example: "c:\progra~1"

Encrypted Boolean
Read-only

Indicates whether the file is encrypted.

EncryptionMethod string
Read-only

Algorithm or tool used to encrypt the logical file. If it is not possible (or not desired) to describe the encryption scheme (perhaps for security reasons), use the following words: Unknown to represent that it is not known whether the logical file is encrypted or not, Encrypted to represent that the file is encrypted but either its encryption scheme is not known or not disclosed, and Not Encrypted to represent that the logical file is not encrypted.

Extension string
Read-only

File extension (without the dot).

Example: "txt", "mof", "mdb"

FileName string
Read-only

File name (without extension) of the file. Example: "autoexec"

FileSize uint64
Read-only

Size of the file (in bytes).

FileType string
Read-only

File type (indicated by the Extension property).

FSCreationClassName string
Read-only

Class of the file system.

FSName string
Read-only

Name of the file system.

Hidden Boolean
Read-only

Indicates whether the file is hidden.

InstallDate datetime
Read-only

When the object was installed. A lack of a value does not indicate that the object is not installed.

InUseCount uint64
Read-only

Number of 'file opens' that are currently active against the file.

LastAccessed datetime
Read-only

When the file was last accessed.

LastModified datetime
Read-only

When the file was last modified.

LogfileName string
Read-only

Name of the file.

Manufacturer string
Read-only

Manufacturer from version resource, if one is present.

MaxFileSize uint32
Read/Write

Maximum size (in bytes) permitted for the log file. If the file exceeds its maximum size, its contents are moved to another file and the primary file is emptied. A value of zero indicates no size limit.

Name string
Read-only

Inherited name that serves as a key of a logical file instance within a file system. Full path names should be provided.

Example: "c:\winnt\system\win.ini"

NumberOfRecords uint32
Read-only

Number of records in the log file. This value is determined by calling the Win32 function GetNumberOfEventLogRecords.

OverwriteOutDated uint32
Read/Write
Qualifiers: Units(Days)

Number of days after which an event can be overwritten.

Values are:

0 = Any entry can be overwritten when necessary.
1..365 = Events that have been in the log file for one year (365 days) or less can be overwritten.
4294967295 = Nothing can be ever be overwritten.

OverWritePolicy string
Read-only

Current overwrite policy the Windows NT/Windows 2000 Event Log service employs for this log file. Data can be overwritten either never, when necessary, or when outdated. When data is outdated depends on the OverwriteOutDated value.

Values are:
"WhenNeeded" (OverWriteOutdated = 0)
"OutDated" = (OverWriteOutdated = 1..365)
"Never" = (OverWriteOutdated = 4294967295)

Path string
Read-only

Path of the file. This includes leading and trailing backslashes.

Example: "\windows\system\"

Readable Boolean
Read-only

Indicates whether the file can be read.

Sources array (string)
Read-only
Status string
Read-only

Current status of the object. Various operational and non-operational statuses can be defined. Operational statuses include: "OK", "Degraded", and "Pred Fail" (an element, such as a SMART-enabled hard drive, may be functioning properly but predicting a failure in the near future). Non-operational statuses include: "Error", "Starting", "Stopping", and "Service". The latter, "Service", could apply during mirror-resilvering of a disk, reload of a user permissions list, or other administrative work. Not all such work is on-line, yet the managed element is neither "OK" nor in one of the other states.

Values are:
"OK"
"Error"
"Degraded"
"Unknown"
"Pred Fail"
"Starting"
"Stopping"
"Service"

System Boolean
Read-only

Indicates whether the file is a system file.

Version string
Read-only

Version string from version resource if one is present.

Writeable Boolean
Read-only

Indicates whether the file can be written.


Methods

The following table lists the methods for Win32_NTEventlogFile.

Method Description
TakeOwnerShip Class method that obtains ownership of the logical file specified in the object path.
ChangeSecurityPermissions Class method that changes the security permissions for the logical file specified in the object path.
Copy Class method that copies the logical file or directory specified in the object path to the location specified by the input parameter.
Rename Class method that renames the logical file (or directory) specified in the object path.
Delete Class method that deletes the logical file (or directory) specified in the object path.
Compress Class method that compresses the logical file (or directory) specified in the object path.
Uncompress Class method that uncompresses the logical file (or directory) specified in the object path.
TakeOwnerShipEx Class method that obtains ownership of the logical file specified in the object path.
ChangeSecurityPermissionsEx Class method that changes the security permissions for the logical file specified in the object path.
CopyEx Class method that copies the logical file or directory specified in the object path to the location specified by the FileName parameter.
DeleteEx Class method that deletes the logical file (or directory) specified in the object path.
CompressEx Class method that compresses the logical file (or directory) specified in the object path.
UncompressEx Class method that uncompresses the logical file (or directory) specified in the object path.
GetEffectivePermission Class method that determines whether the caller has the aggregated permissions specified by the Permission argument not only on the file object, but on the share the file or directory resides on (if it is on a share).

Remarks

The Win32_NTEventlogFile class is derived from CIM_DataFile.

See Also

Operating System Classes