Results 1 to 7 of 7

Thread: Eject CD

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User underfacker's Avatar
    Join Date: Dec:2007
    Location:
    Posts: 271

    Eject CD

    , CD/DVD ... !?! !
    Shortcut !

  2. #2
    Zyzzogeton den_zuk's Avatar
    Join Date: Feb:2008
    Location: Varna
    Posts: 2,526
    .... ... .... , shame on me!


    In plain MSDOS CMD, you can't do this. However..

    You can write a vb script to do that, then just execute the script from the command prompt.

    Create a txt file called "opencdtray.vbs"

    Open the file, and copy this into the document and save:

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


    For i = 0 To colCDROMs.count-1
    colCDROMs.item(i).eject
    Next
    MSI B450M Pro-VDH Max, Ryzen 5 2600, Freezer 34 Esports Duo, 16 GB Gammix D30, Inno3D GTX1660 X2, AC Fusion 550R, LG 29WP500-B Ultra Wide


  3. #3
    If it ain't broke o/c it WoW's Avatar
    Join Date: Jun:2004
    Location: Motor City
    Posts: 1,980
    vb script, , :

    Code:
    Dim ts
    Dim strDriveLetter
    Dim intDriveLetter
    Dim fs 'As Scripting.FileSystemObject
    Const CDROM = 4
        On Error Resume Next
        Set fs = CreateObject("Scripting.FileSystemObject")
        strDriveLetter = ""
        For intDriveLetter = Asc("A") To Asc("Z")
            Err.Clear
            If fs.GetDrive(Chr(intDriveLetter)).DriveType = CDROM Then
                If Err.Number = 0 Then
                    strDriveLetter = Chr(intDriveLetter)
                    Exit For
                End If
            End If
        Next
    MSGBOX "YOUR CD IS: " & strDriveLetter,VBOKONLY + 48,"CDROM=> " & strDriveLetter
    Set oWMP = CreateObject("WMPlayer.OCX.7" )
    Set colCDROMs = oWMP.cdromCollection
         For d = 0 to colCDROMs.Count - 1
    colCDROMs.Item(d).Eject
    Next 'null 
    A1= msgbox ("Press key To Close Cd" & vbcrlf &_
     " The Cd Will Close", 0 + 64, "Open Close Cd Tray")
        For d = 0 to colCDROMs.count - 1
               colCDROMs.Item(d).Eject 
    Next 'null
    set owmp = nothing
    set colCDROMs = Nothing
    wscript.quit

  4. #4
    Frank Bullitt Domino's Avatar
    Join Date: Feb:2006
    Location: Sofia
    Posts: 587
    Eject ?
    "- Frank, we must all compromise.
    - Bulls**t! Get the hell out of here. Now."

  5. #5
    Zyzzogeton den_zuk's Avatar
    Join Date: Feb:2008
    Location: Varna
    Posts: 2,526
    ... -....
    MSI B450M Pro-VDH Max, Ryzen 5 2600, Freezer 34 Esports Duo, 16 GB Gammix D30, Inno3D GTX1660 X2, AC Fusion 550R, LG 29WP500-B Ultra Wide


  6. #6
    Registered User underfacker's Avatar
    Join Date: Dec:2007
    Location:
    Posts: 271
    ;-) .bat ?

  7. #7

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |