Returns the media status of the specified CD/DVD drive.

CDStatus := DriveGetStatusCD(Drive)



Type: String

The drive letter followed by a colon. If omitted, the default CD/DVD drive will be used.

Return Value

Type: String

This function returns the media status of the specified CD/DVD drive:

not ready The drive is not ready to be accessed, perhaps due to being engaged in a write operation. Known limitation: "not ready" also occurs when the drive contains a DVD rather than a CD.
open The drive contains no disc, or the tray is ejected.
playing The drive is playing a disc.
paused The previously playing audio or video is now paused.
seeking The drive is seeking.
stopped The drive contains a CD but is not currently accessing it.

Error Handling

An exception is thrown on failure.


This function will probably not work on a network drive or non-CD/DVD drive; if it fails in such cases or for any other reason, an exception is thrown.

If the tray was recently closed, there may be a delay before the function completes.


DriveEject, Drive functions


See example #1 on the Drive Functions page for a demonstration of this function.