Win32_CDROMDrive

The Win32_CDROMDrive class represents a CD-ROM drive on a Win32_ComputerSystem.

Note: The name of the drive does not correspond to the logical drive letter assigned to device.

Quick Start

Properties

In this WMI class, all WMI properties are read-only. You can only read values but not change them.

Availability

Data type UInt16

The availability and status of the device. For example, the Availability property indicates that the device is running and has full power (value=3), or is in a warning (4), test (5), degraded (10) or power save state (values 13-15 and 17). Regarding the power saving states, these are defined as follows: Value 13 (“Power Save – Unknown”) indicates that the device is known to be in a power save mode, but its exact status in this mode is unknown; 14 (“Power Save – Low Power Mode”) indicates that the device is in a power save state but still functioning, and may exhibit degraded performance; 15 (“Power Save – Standby”) describes that the device is not functioning but could be brought to full power ‘quickly’; and value 17 (“Power Save – Warning”) indicates that the device is in a warning state, though also in a power save mode.

$Availability_ReturnValue = 
@{
    1='Other'
    2='Unknown'
    3='Running/Full Power'
    4='Warning'
    5='In Test'
    6='Not Applicable'
    7='Power Off'
    8='Off Line'
    9='Off Duty'
   10='Degraded'
   11='Not Installed'
   12='Install Error'
   13='Power Save - Unknown'
   14='Power Save - Low Power Mode'
   15='Power Save - Standby'
   16='Power Cycle'
   17='Power Save - Warning'
   18='Paused'
   19='Not Ready'
   20='Not Configured'
   21='Quiesced'
}

Capabilities

Data type UInt16

Capabilities of the media access device. For example, the device may support “Random Access”, removable media and “Automatic Cleaning”. In this case, the values 3, 7 and 9 would be written to the array.

Several of the enumerated values require some explanation: 1) Value 11, Supports Dual Sided Media, distinguishes a Device that can access both sides of dual sided Media, from a Device that reads only a single side and requires the Media to be flipped; and, 2) Value 12, Predismount Eject Not Required, indicates that Media does not have to be explicitly ejected from the Device before being accessed by a PickerElement.

CapabilityDescriptions

Data type String

An array of free-form strings providing more detailed explanations for any of the access device features indicated in the Capabilities array. Note, each entry of this array is related to the entry in the Capabilities array that is located at the same index.

Caption

Data type String

The Caption property is a short textual description (one-line string) of the object.

CompressionMethod

Data type String

A free form string indicating the algorithm or tool used by the device to support compression. If it is not possible or not desired to describe the compression scheme (perhaps because it is not known), recommend using the following words: “Unknown” to represent that it is not known whether the device supports compression capabilities or not, “Compressed” to represent that the device supports compression capabilities but either its compression scheme is not known or not disclosed, and “Not Compressed” to represent that the devices does not support compression capabilities.

ConfigManagerErrorCode

Data type UInt32

Indicates the Win32 Configuration Manager error code. The following values may be returned:

0 This device is working properly.

1 This device is not configured correctly.

2 Windows cannot load the driver for this device.

3 The driver for this device might be corrupted, or your system may be running low on memory or other resources.

4 This device is not working properly. One of its drivers or your registry might be corrupted.

5 The driver for this device needs a resource that Windows cannot manage.

6 The boot configuration for this device conflicts with other devices.

7 Cannot filter.

8 The driver loader for the device is missing.

9 This device is not working properly because the controlling firmware is reporting the resources for the device incorrectly.

10 This device cannot start.

11 This device failed.

12 This device cannot find enough free resources that it can use.

13 Windows cannot verify this device’s resources.

14 This device cannot work properly until you restart your computer.

15 This device is not working properly because there is probably a re-enumeration problem.

16 Windows cannot identify all the resources this device uses.

17 This device is asking for an unknown resource type.

18 Reinstall the drivers for this device.

19 Your registry might be corrupted.

20 Failure using the VxD loader.

21 System failure: Try changing the driver for this device. If that does not work, see your hardware documentation. Windows is removing this device.

22 This device is disabled.

23 System failure: Try changing the driver for this device. If that doesn’t work, see your hardware documentation.

24 This device is not present, is not working properly, or does not have all its drivers installed.

25 Windows is still setting up this device.

26 Windows is still setting up this device.

27 This device does not have valid log configuration.

28 The drivers for this device are not installed.

29 This device is disabled because the firmware of the device did not give it the required resources.

30 This device is using an Interrupt Request (IRQ) resource that another device is using.

31 This device is not working properly because Windows cannot load the drivers required for this device.

$ConfigManagerErrorCode_ReturnValue = 
@{
    0='This device is working properly.'
    1='This device is not configured correctly.'
    2='Windows cannot load the driver for this device.'
    3='The driver for this device might be corrupted    4= or your system may be running low on memory or other resources.'

    5='This device is not working properly. One of its drivers or your registry might be corrupted.'
    6='The driver for this device needs a resource that Windows cannot manage.'
    7='The boot configuration for this device conflicts with other devices.'
    8='Cannot filter.'
    9='The driver loader for the device is missing.'
   10='This device is not working properly because the controlling firmware is reporting the resources for the device incorrectly.'
   11='This device cannot start.'
   12='This device failed.'
   13='This device cannot find enough free resources that it can use.'
   14='Windows cannot verify this device's resources.'    15='This device cannot work properly until you restart your computer.'    16='This device is not working properly because there is probably a re-enumeration problem.'    17='Windows cannot identify all the resources this device uses.'    18='This device is asking for an unknown resource type.'    19='Reinstall the drivers for this device.'    20='Failure using the VxD loader.'    21='Your registry might be corrupted.'    22='System failure: Try changing the driver for this device. If that does not work
   23= see your hardware documentation. Windows is removing this device.'    24='This device is disabled.'    25='System failure: Try changing the driver for this device. If that doesn't work    26= see your hardware documentation.'
   27='This device is not present   28= is not working properly
   29= or does not have all its drivers installed.'

   30='Windows is still setting up this device.'
   31='Windows is still setting up this device.'
}

ConfigManagerUserConfig

Data type Boolean

Indicates whether the device is using a user-defined configuration.

CreationClassName

Data type String

CreationClassName indicates the name of the class or the subclass used in the creation of an instance. When used with the other key properties of this class, this property allows all instances of this class and its subclasses to be uniquely identified.

DefaultBlockSize

Data type UInt64

Default block size, in bytes, for this device.

Description

Data type String

The Description property provides a textual description of the object.

DeviceID

Data type String

The DeviceID property contains a string to uniquely identify this CD-ROM drive.

Drive

Data type String

The Drive property indicates the drive letter of the CD ROM drive.

Example: d:\

DriveIntegrity

Data type Boolean

The DriveIntegrity property indicates whether files can be accurately read from the CD device. This is achieved by reading a block of data twice and comparing the data against itself.

ErrorCleared

Data type Boolean

ErrorCleared is a boolean property indicating that the error reported in LastErrorCode property is now cleared.

ErrorDescription

Data type String

ErrorDescription is a free-form string supplying more information about the error recorded in LastErrorCode property, and information on any corrective actions that may be taken.

ErrorMethodology

Data type String

ErrorMethodology is a free-form string describing the type(s) of error detection and correction supported by this device.

FileSystemFlags

Data type UInt16

The FileSystemFlags property is deprecated in favor of FileSystemFlagsEx

FileSystemFlagsEx

Data type UInt32

The FileSystemFlagsEx property indicates the file system flags associated with the Win32 CD-ROM drive. This parameter can be any combination of flags. FS_FILE_COMPRESSION and FS_VOL_IS_COMPRESSED are mutually exclusive.

Example: 0.

$CaseSensitiveSearch=1
$CasePreservedNames=2
$UnicodeOnDisk=4
$PersistentACLs=8
$FileCompression=16
$VolumeQuotas=32
$SupportsSparseFiles=64
$SupportsReparsePoints=128
$SupportsRemoteStorage=256
$SupportsLongNames=512
$VolumeIsCompressed=1024
$SupportsObjectIDs=2048
$SupportsEncryption=4096
$SupportsNamedStreams=8192

$FileSystemFlagsEx = $FileCompression + $VolumeQuotas

Id

Data type String

The Id property indicates the driver letter uniquely identifying this CD-ROM drive.

Example: d:\

InstallDate

Data type DateTime

The InstallDate property is datetime value indicating when the object was installed. A lack of a value does not indicate that the object is not installed.

LastErrorCode

Data type UInt32

LastErrorCode captures the last error code reported by the logical device.

Manufacturer

Data type String

The Manufacturer property indicates the manufacturer of the Win32 CD-ROM drive.

Example: PLEXTOR

MaxBlockSize

Data type UInt64

Maximum block size, in bytes, for media accessed by this device.

MaximumComponentLength

Data type UInt32

The MaximumComponentLength property indicates the maximum length of a filename component supported by the Win32 CD-ROM drive. A filename component the portion of a filename between backslashes. The value can be used to indicate that long names are supported by the specified file system. For example, for a FAT file system supporting long names, the function stores the value 255, rather than the previous 8.3 indicator. Long names can also be supported on systems that use the NTFS file system.

Example: 255.

MaxMediaSize

Data type UInt64

Maximum size, in Kbytes, of media supported by this device. KBytes is interpreted as the number of bytes multiplied by 1000 (NOT the number of bytes multiplied by 1024).

MediaLoaded

Data type Boolean

The MediaLoaded property indicates whether a CD-ROM is in the drive.

Values: $true or $false. If $true, the CD is in the drive.

MediaType

Data type String

The MediaType property indicates the type of media used or accessed by this device. In this class, the value will always be “CD-ROM”.

MfrAssignedRevisionLevel

Data type String

The MfrAssignedRevisionLevel property indicates the manufacturer assigned firmware revision level of the CDROM drive.

MinBlockSize

Data type UInt64

Minimum block size, in bytes, for media accessed by this device.

Name

Data type String

The Name property defines the label by which the object is known. When subclassed, the Name property can be overridden to be a Key property.

NeedsCleaning

Data type Boolean

Boolean indicating that the media access device needs cleaning. Whether manual or automatic cleaning is possible is indicated in the Capabilities array property.

NumberOfMediaSupported

Data type UInt32

When the media access device supports multiple individual media, this property defines the maximum number which can be supported or inserted.

PNPDeviceID

Data type String

Indicates the Win32 Plug and Play device ID of the logical device. Example: *PNP030b

PowerManagementCapabilities

Data type UInt16

Indicates the specific power-related capabilities of the logical device. The array values, 0=”Unknown”, 1=”Not Supported” and 2=”Disabled” are self-explanatory. The value, 3=”Enabled” indicates that the power management features are currently enabled but the exact feature set is unknown or the information is unavailable. “Power Saving Modes Entered Automatically” (4) describes that a device can change its power state based on usage or other criteria. “Power State Settable” (5) indicates that the SetPowerState method is supported. “Power Cycling Supported” (6) indicates that the SetPowerState method can be invoked with the PowerState input variable set to 5 (“Power Cycle”). “Timed Power On Supported” (7) indicates that the SetPowerState method can be invoked with the PowerState input variable set to 5 (“Power Cycle”) and the Time parameter set to a specific date and time, or interval, for power-on.

PowerManagementSupported

Data type Boolean

Boolean indicating that the Device can be power managed – ie, put into a power save state. This boolean does not indicate that power management features are currently enabled, or if enabled, what features are supported. Refer to the PowerManagementCapabilities array for this information. If this boolean is $false, the integer value 1, for the string, “Not Supported”, should be the only entry in the PowerManagementCapabilities array.

RevisionLevel

Data type String

The RevisionLevel property indicates the firmware revision level of the Win32 CD-ROM drive.

SCSIBus

Data type UInt32

The SCSIBus property indicates the SCSI bus number for the disk drive.

Example: 0

SCSILogicalUnit

Data type UInt16

The SCSILogicalUnit property indicates the SCSI logical unit number (LUN) of the disk drive. The LUN is used to designate which SCSI controller is being accessed in a system with more than one controller being used. The SCSI device ID is similar, but is the designation for multiple devices on one controller.

Example: 0

SCSIPort

Data type UInt16

The SCSIPort property indicates the SCSI port number of the disk drive.

Example: 1

SCSITargetId

Data type UInt16

The SCSITargetId property indicates the SCSI ID number of the Win32 CD-ROM drive.

Example: 0.

SerialNumber

Data type String

The Serial number property is a manufacturer-allocated number used to identify the physicalmedia.

Example: WD-WM3493798728 for a disk serial number.

Size

Data type UInt64

The Size property indicates the size of the disk drive.

Status

Data type String

The Status property is a string indicating the current status of the object. Various operational and non-operational statuses can be defined. Operational statuses are “OK”, “Degraded” and “Pred Fail”. “Pred Fail” indicates that an element may be functioning properly but predicting a failure in the near future. An example is a SMART-enabled hard drive. Non-operational statuses can also be specified. These are “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.

'OK','Error','Degraded','Unknown','Pred Fail','Starting','Stopping','Service','Stressed','NonRecover','No Contact','Lost Comm'

StatusInfo

Data type UInt16

StatusInfo is a string indicating whether the logical device is in an enabled (value = 3), disabled (value = 4) or some other (1) or unknown (2) state. If this property does not apply to the logical device, the value, 5 (“Not Applicable”), should be used.

$StatusInfo_ReturnValue = 
@{
    1='Other'
    2='Unknown'
    3='Enabled'
    4='Disabled'
    5='Not Applicable'
}

SystemCreationClassName

Data type String

The scoping System’s CreationClassName.

SystemName

Data type String

The scoping System’s Name.

TransferRate

Data type Real64

The TransferRate property indicates the CD-ROM drive’s transfer rate. A value of -1 indicates that the rate could not be determined. This could potentially happen, for example, if the CD is not in the drive.

VolumeName

Data type String

The VolumeName property indicates the volume name of the Win32 CD-ROM drive.

VolumeSerialNumber

Data type String

The VolumeSerialNumber property indicates the volume serial number of the media in the CD-ROM drive.

Example: A8C3-D032

Methods

Examples

Help and Questions

  Community Content

You are cordially invited to add knowledge to this page. If you have sample code or additional information related to this WMI class, please share it. Use the comment form to send your information. We will edit and incorparate it into the reference library. Thank you!

Please do not use the comment form to submit questions. If you have questions or need assistance, visit our free forum: Help me with WMI.

Content last updated: 2013-12-27 12:17:21 (UTC).

Facebooktwittergoogle_pluspinterestlinkedinFacebooktwittergoogle_pluspinterestlinkedin