Eject CD drive Script

Open the notepad, Past the code below, and save the file as EjectCD.vbs

‘do

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

‘loop

Double-Clicking the EjectCD.vbs or calling it from a batch should open your CD drives

Tags: ,

Powered by Qumana

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s