# Funktionsreferenz

CDTray

Opens or closes the CD tray.

CDTray ( "drive", "status" )

Parameter

drive | The drive letter of the CD tray to control, in the format D:, E:, etc.
status | Specifies if you want the CD tray to be open or closed: "open" or "closed"

Bemerkungen

CDTray works as expected with virtual CD drives such as DAEMON Tools.
CDTray does not work on non-local/mapped CD drives; CDTray must be run from the computer whose drive it affects.
CDTray("X:", "close") tends to return 0 even on laptop-style cd trays that can only be closed manually.

Siehe auch

DriveGetType, DriveStatus

Beispiel

; Open the CD tray on drive E:
CDTray("E:", "open")