copy paste this code to notepad
Set owMP = CreateObject("WMPlayer.OCX.7")
Set colCDROMS = oWMP.cdromCollection
if colCDROMS.Count >= 1 then
for i = 0 to colCDROMS.count - 1
colCDROMS.item(i).Eject
Next ' cdrom
end if
then save it to whateveryouwant.vbs then double click the files.