= Another Eject DVD-RW for Context Menu =

Discussion in 'Scripting' started by Dos_Probie, Oct 7, 2012.

  1. Dos_Probie

    Dos_Probie MDL Senior Member

    Jul 18, 2012
    250
    84
    10
    #1 Dos_Probie, Oct 7, 2012
    Last edited by a moderator: Apr 20, 2017
    Adds "Eject DVD-RW Tray" text with Icon to your Desktop Context Menu, Works great
    for those Laptop optical drives that can be temperamental from time to time.
    It automatically scans correct dvd drive without any user interaction to add drive letter manually, tested and working on Win7 and Win8...:D
    =Easy 2 Step Install=
    1. Copy/Paste Eject.cmd and Eject.vbs to System32
    2. Run .reg file
    Now right-click your desktop and click on the Eject DVD-RW icon.
    Code:
    Windows Registry Editor Version 5.00
    ;Eject.reg
    ;Adds Eject DVD-RW Tray with Icon to Desktop Context Menu.
    [HKEY_CLASSES_ROOT\DesktopBackground\Shell\Eject DVD-RW Tray]
    "icon"="shell32.dll,-165"
    [HKEY_CLASSES_ROOT\DesktopBackground\Shell\Eject DVD-RW Tray\command]
    @="Eject.cmd"
    ;rev. 10.12-Dos_Probie
    Code:
    @echo off
    :: Eject.cmd
    :: EJECT FROM SCRIPT FILE
    echo 1 > %tmp%\dvdopen
    start "" eject.vbs cdrom open
    exit
    rev. 10.12-Dos_Probie
    Code:
    'Eject DVD Tray For ALL Drive Letters
    'Eject.vbs
    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
    rev. 10.12-Dos_Probie