[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
    2,636
    2,143
    90
    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
    190
    177
    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
     
  3. moderate

    moderate MDL Guru

    Aug 31, 2009
    2,636
    2,143
    90
    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
    6,787
    10,376
    210
    #4 murphy78, Oct 21, 2014
    Last edited by a moderator: Apr 20, 2017
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Tito

    Tito Super Mod / Adviser
    Staff Member

    Nov 30, 2009
    17,499
    15,288
    340
    @murphy78

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

    DioNZB MDL Member

    Jun 23, 2013
    190
    177
    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 
     
  7. Chibi ANUBIS

    Chibi ANUBIS MDL Chibi Developer

    Apr 28, 2014
    722
    402
    30
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    6,787
    10,376
    210
    Hmm must have been in my own little world. *boggle*
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. Mr Jinje

    Mr Jinje MDL Expert

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

    moderate MDL Guru

    Aug 31, 2009
    2,636
    2,143
    90
    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
    17,499
    15,288
    340
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,773
    1,080
    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
    2,636
    2,143
    90
  14. boscru6469

    boscru6469 MDL Member

    Jan 9, 2012
    248
    61
    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
    2,636
    2,143
    90
    Shortcut to drive, which is sometimes here, sometimes there, sometimes nowhere isn't IMHO good idea.
     
  16. LiteOS

    LiteOS MDL Expert

    Mar 7, 2014
    1,423
    541
    60
    mb disable the driver