Not often you see me asking for help....but

BonyTony

OSNN Senior Addict
Joined
23 Jan 2002
Messages
788
I have a shuttle Pc with a Stealthed CD-RW (looks much cooler) but i have to use a 3rd party programme called Cd Eject 2002 which is ok...but if i can do without it the better it is for me.

I have noticed that when i right click my cd-rw i have the options to eject and close the cd-rw door (knew about the eject part just never noticed the close command as well!)

So my question is..If i can open/close my cd-rw with the use of a few mouse clicks can i somehow assign a hotkey to do the job (thus eliminating cd eject2002) instead of having to use the mouse ?.

I have looked around and not found anything usefull......so if you know anything can you pass it on.

The commands must be somewhere in windows to control the function but it seems to be hard to find.
 
there are prank progs to open and close the cd draw, possible if you find 1 you can view the code :)
 
here's the vb script from that prank



<SCRIPT LANGUAGE="VBScript">
MsgBox "Click here to recieve a free cup holder",64,"Your free Cup holder"
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
</SCRIPT>
 
You can also use computer management to add "removable media" to your PC it gives you the option to inject, or eject a CD
 
Thanks for the replies but i wanted to get away from using 3rd party software to eject/close my cdrom tray....i am not sure how to use/modify the vb script for my use so if someone can explain it to me i would give it a try...and on the subject of "removable media" is this also hotkey-able for ejecting/closing the cd tray ?.

The command for open/close cd tray is in windows somewhere...i will find it:happy: .Again thanks for the replies.
 
I am curious what that command is also.... I looked but I dont know what I am looking for ... wheather it is an *.exe or *.pif or whatever??
 
I would go with the utility (eject.exe) posted by mbx. You wouldn't really consider a 12 kb command line utility 3rd party software?
Anyway the download comes with the sourcecode included. Perhaps you can get some hints from there.
 
Assuming you are running XP, you can change the VisualBasic script to this.

Set oWMP = CreateObject("WMPlayer.OCX.7")
Set colCDROMs = oWMP.cdromCollection
colCDROMs.Item(0).Eject

Save those three lines as something.vbs. You can create a shortcut to it then give the shortcut a shortcut key combo to run it. This should eject the first CD drive on your computer. Change the 0 to a 1 on the last line if you want to eject a second drive. It won't close the tray for you tho. :huh:
 
This script works to open the cdrom drive, but it also starts an extra process wscript.exe that uses resources (about 10 mb of ram) and keeps running even when the drive is closed again. You have to kill it from taskmanager.
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back