[Q:] Is there script or batch command, which will eject CD-ROM?

Discussion in 'Windows 8' started by moderate, Oct 21, 2014.

  1. moderate

    moderate MDL Guru

    Aug 31, 2009
    3,355
    2,479
    120
    Hello,

    as you probably know some USB devices (specially WWAN sticks like UMTS, LTE, CDMA) have "two-virtual-devices-inside":
    1. ZeroCD - Virtual CD with x64/x32 driver for 2nd "main" device...
    2. Main function like: LTE, UMTS modem or NIC card or ports etc.

    When such USB device is plugged ZeroCD is runned and main device is inaccessible until ZeroCD is ejected. (Driver installation app just ejects ZeroCD in the end.)

    So on the Windows ARM, ZeroCD with x64 and x32 driver is mounted and that's it. I even didn't know, that to access Modem/NIC function (without installing driver) I have to eject ZeroCD.

    Now I am seeking for CMD or VBS, what will run on ARM (EXE won't of course) to auto eject ZeroCD (so I can access Device Manager and update drivers).

    So is there any?
     
  2. DioNZB

    DioNZB MDL Member

    Jun 23, 2013
    239
    419
    10
    #2 DioNZB, Oct 21, 2014
    Last edited by a moderator: Apr 20, 2017
    Hello,

    yes there is

    You have to fill in your drive letter (this can eject also usb drives)

    Code:
    eject G:\
    if you want to insert the drive
    you do this

    Code:
    eject G:\ /l
    :D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. moderate

    moderate MDL Guru

    Aug 31, 2009
    3,355
    2,479
    120
    Microsoft Windows [Version 6.3.9600]
    (c) 2013 Microsoft Corporation. All rights reserved.

    C:\Windows>eject
    'eject' is not recognized as an internal or external command,
    operable program or batch file.

    C:\Windows>
     
  4. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,394
    11,615
    240
    #4 murphy78, Oct 21, 2014
    Last edited by a moderator: Apr 20, 2017
  5. Tito

    Tito Super Mod / Adviser
    Staff Member

    Nov 30, 2009
    18,682
    18,581
    340
    @murphy78

    OP doesn't want to mount/dismount ISO images. He wants to toggle between the optical media and the other hardware.
     
  6. DioNZB

    DioNZB MDL Member

    Jun 23, 2013
    239
    419
    10
    #6 DioNZB, Oct 21, 2014
    Last edited by a moderator: Apr 20, 2017

    and these:? (Save as VBS)

    Code:
    Set oWMP = CreateObject("WMPlayer.OCX.7") 
    Set colCDROMs = oWMP.cdromCollection 
    do 
    if colCDROMs.Count >= 1 then 
    For i = 0 to colCDROMs.Count -1 
    colCDROMs.Item(i).Eject 
    Next 
    For i = 0 to colCDROMs.Count -1 
    colCDROMs.Item(i).Eject 
    Next 
    End If 
    wscript.sleep 5000 
    loop 
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Chibi ANUBIS

    Chibi ANUBIS MDL Chibi Developer

    Apr 28, 2014
    1,235
    910
    60
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,394
    11,615
    240
    Hmm must have been in my own little world. *boggle*
     
  9. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,770
    1,101
    60
    #9 Mr Jinje, Oct 21, 2014
    Last edited by a moderator: Apr 20, 2017
  10. moderate

    moderate MDL Guru

    Aug 31, 2009
    3,355
    2,479
    120
    Yes, PowerShell is there (without ISE). Same DotNET v4-5-2 is there.

    I have to try your solutions... :))
     
  11. Tito

    Tito Super Mod / Adviser
    Staff Member

    Nov 30, 2009
    18,682
    18,581
    340
  12. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,770
    1,101
    60
    #12 Mr Jinje, Oct 21, 2014
    Last edited by a moderator: Apr 20, 2017
    When you right click on the virtual CD drive, is there an 'Eject' option. If so, we can Eject by using the 'verb' action.

     
  13. moderate

    moderate MDL Guru

    Aug 31, 2009
    3,355
    2,479
    120
  14. boscru6469

    boscru6469 MDL Senior Member

    Jan 9, 2012
    254
    62
    10
    You could click on Start & Computer. Then drag the drive to your desktop. That will put a shortcut on your desktop and all you need to do is right click and select Eject.
     
  15. moderate

    moderate MDL Guru

    Aug 31, 2009
    3,355
    2,479
    120
    Shortcut to drive, which is sometimes here, sometimes there, sometimes nowhere isn't IMHO good idea.
     
  16. LiteOS

    LiteOS Windowizer

    Mar 7, 2014
    2,198
    974
    90
    mb disable the driver