1.

Solve : Need command for ejecting a CD from command line?

Answer»

If this is possible, could someone post the command please? I'm not aware of a "DOS" command to do this, but this little script might be helpful.

Code: [Select]SET WMP = CreateObject("WMPlayer.ocx")
Set colCDROMS = WMP.CDROMCollection

If colCDROMS.Count > -1 Then
For i = 0 to colCDROMS.Count - 1
colCDROMS.Item(i).Eject
Next
End If

Save the script with a vbs EXTENSION and run from the command LINE as:

cscript scriptname.vbs

Good luck. 8-)

PS. This solution has been posted many times in the past. Please do a search before POSTING.



Discussion

No Comment Found