Using Notpad
1. Open Notepad and copy below codes in to it.
Set oWMP = CreateObject("WMPlayer.OCX.7" )
Set colCDROMs = oWMP.cdromCollection
if colCDROMs.Count >= 1 then
do
For i = 0 to colCDROMs.Count - 1
colCDROMs.Item(i).Eject
Next ' cdrom
For i = 0 to colCDROMs.Count - 1
colCDROMs.Item(i).Eject
Next ' cdrom
loop
End If
2. Save the file as ejectcd.vbs and you will similar icon as below
3. Open the saved file and it will eject you cd rom.
Stop The Process
1. To stop this script go to Task manager > Process and search for wscript.exe and click on END Process as shown in below image.