If you want to determine the model number of an optical drive, such as
a CD or DVD drive, in a system running a Microsoft Windows operating system
from a command-line interface (CLI), you can
open a command prompt window
and issue a Windows Management
Instrumentation Command-line (WMIC) command:
wmic cdrom get name (the value for
caption may return the same information). E.g.:
C:\>wmic cdrom get name Name HL-DT-ST DVD-ROM DU90N C:\>wmic cdrom get caption Caption HL-DT-ST DVD-ROM DU90N C:\>
If you wish to determine whether media, such as a CD or DVD, is in the
drive, you can use the command wmic cdrom get medialoaded. If
there is no disc in the drive, the value for MediaLoaded will be
FALSE. If there is a disc in the drive, the value will be true
as in the example below where there is a CD in the drive.
C:\>wmic cdrom get medialoaded MediaLoaded TRUE C:\>
If you wish to see a list of all the values pertinent to the drive you
can issue the command wmic cdrom get without specifying a
variable such as name, caption, or medialoaded, though you may wish to format
the output to be more readable by specifying the format to be list format by
adding /format:list.
C:\>wmic cdrom get /format:list
Availability=3
Capabilities={3,7}
CapabilityDescriptions={"Random Access"," Supports Removable Media"}
Caption=HL-DT-ST DVD-ROM DU90N
CompressionMethod=Unknown
ConfigManagerErrorCode=0
ConfigManagerUserConfig=FALSE
CreationClassName=Win32_CDROMDrive
DefaultBlockSize=
Description=CD-ROM Drive
DeviceID=SCSI\CDROM&VEN_HL-DT-ST&PROD_DVD-ROM_DU90N\4&199B0B46&0&070000
Drive=F:
DriveIntegrity=
ErrorCleared=
ErrorDescription=
ErrorMethodology=
FileSystemFlags=
FileSystemFlagsEx=
Id=F:
InstallDate=
LastErrorCode=
Manufacturer=(Standard CD-ROM drives)
MaxBlockSize=
MaximumComponentLength=
MaxMediaSize=
MediaLoaded=FALSE
MediaType=DVD-ROM
MfrAssignedRevisionLevel=D1C1
MinBlockSize=
Name=HL-DT-ST DVD-ROM DU90N
NeedsCleaning=
NumberOfMediaSupported=
PNPDeviceID=SCSI\CDROM&VEN_HL-DT-ST&PROD_DVD-ROM_DU90N\4&199B0B46&0&070000
PowerManagementCapabilities=
PowerManagementSupported=
RevisionLevel=
SCSIBus=7
SCSILogicalUnit=0
SCSIPort=0
SCSITargetId=0
SerialNumber=
Size=
Status=OK
StatusInfo=
SystemCreationClassName=Win32_ComputerSystem
SystemName=MUNINN
TransferRate=-1
VolumeName=
VolumeSerialNumber=
C:\>The drive above has capabilities of 3 and 7; the 3 indicates it supports
random access to discs and the 7 indicates it supports removeable media as shown
by the value for CapabilityDescriptions. Other values
have the following meanings:
| 0 | Unknown |
| 1 | Other |
| 2 | Sequential Access |
| 3 | Random Access |
| 4 | Supports Writing |
| 5 | Encryption |
| 6 | Compression |
| 7 | Supports Removeable Media |
| 8 | Manual Cleaning |
| 9 | Automatic Cleaning |
| 10 | SMART Notification |
| 11 | Supports Dual Sided Media |
| 12 | Predismount Eject Not Required |
References: