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

Discussion in 'Windows Desktop Systems' started by BonyTony, Apr 9, 2003.

  1. BonyTony

    BonyTony Moderator

    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.
     
  2. GoNz0

    GoNz0 NTFS Stoner

    Messages:
    2,781
    Location:
    the year 2525
    there are prank progs to open and close the cd draw, possible if you find 1 you can view the code :)
     
  3. Perris Calderon

    Perris Calderon Moderator Staff Member Political User

    Messages:
    12,332
    Location:
    new york
    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>
     
  4. vdubVR6

    vdubVR6 Guest

    You can also use computer management to add "removable media" to your PC it gives you the option to inject, or eject a CD
     
  5. mbx

    mbx Guest

    Two options spring to mind.
    A program called Express CD-Ejector v1.0.4 can be found at
    .This sits in your taskbar and allows for multiple drives.

    An alternative is a command line program called Eject (v2.02) which can be found at http://www.cmdtools.com .Just assign a keyboard shortcut to the .exe. help with assigning shortcuts can be found at http://www.internetfixes.com/help_desk_winxp/winxp_3.htm .


    Hope that helps :)
     
  6. BonyTony

    BonyTony Moderator

    Messages:
    788
    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.
     
  7. PseudoKiller

    PseudoKiller Zug Zug

    Messages:
    3,858
    Location:
    Ice Crown Citadel
    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??
     
  8. Perris Calderon

    Perris Calderon Moderator Staff Member Political User

    Messages:
    12,332
    Location:
    new york
  9. yoyo

    yoyo _________________

    Messages:
    1,557
    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.
     
  10. zyfos

    zyfos Resurrected

    Messages:
    236
    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:
     
  11. yoyo

    yoyo _________________

    Messages:
    1,557
    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.