MoonPoint Support Logo

 

Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
July
Sun Mon Tue Wed Thu Fri Sat
         
8
           
2016
Months
Jul


Fri, Jul 08, 2016 10:55 pm

Ejecting a CD or DVD drive from a command prompt

If you need to eject a CD/DVD disk drive from a command line interface (CLI) there are a number of ways to do so. Three ways to do so from a command prompt on a Microsoft Windows system are included below.

Batch File

@echo off
echo Set oWMP = CreateObject("WMPlayer.OCX.7")  >> %temp%\temp.vbs
echo Set colCDROMs = oWMP.cdromCollection       >> %temp%\temp.vbs
echo For i = 0 to colCDROMs.Count-1             >> %temp%\temp.vbs
echo colCDROMs.Item(i).Eject                    >> %temp%\temp.vbs
echo next                                       >> %temp%\temp.vbs
echo oWMP.close                                 >> %temp%\temp.vbs
%temp%\temp.vbs
timeout /t 1
del %temp%\temp.vbs

[ More Info ]

[/os/windows/utilities] permanent link

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo