I have been trying to eject the cd drive with the use of the cmd.
However, I am stumped. Searching on the internet, I only found this answer:
eject D:
and a similiar answer
eject D: /I
Both of them do not work.
EDIT
Now people have found this answer on superuser,
Set oWMP = CreateObject("WMPlayer.OCX.7")
Set colCDROMs = oWMP.cdromCollection
colCDROMs.Item(0).Eject
However, I get an error:
colCDROMS.Item is not recognized as an internal or external command, operable program or batch file.
Best Answer
You can eject a cd with a batch file (this is part vbscript
This is not my work, I found it in the stackoverflow community:
Post Link: Batch Command Line to Eject CD Tray?
Answer Author: Bruno
Date Answered: Feb 10, 2015