Open/Close CD Drive(s) Programmatically

In Windows Explorer, you can right-click on a CD-Drive and select the "Eject" option to open the CD Drive. Unfortunately, there is no "Close" equivelant to Close the drive. This project builds a command-line program that lets you open or close any or all of your CD-Drives.
To display the program's usage, run the program with no parameters:
C:\> CDR
usage:
 CDR [open|close] [Drive-Letter|ALL]
example:
 CDR open E:
 CDR close ALL
C:\>
To OPEN or CLOSE the first logical CD Drive:
C:\> CDR open
C:\> CDR close
   If you have more than one CD Drive, you can specify a drive letter: 
C:\> CDR open g:
C:\> CDR close g:
If you have more than one CD Drive, you can specify ALL drives:
C:\> CDR open all
C:\> CDR close all
Download  347kb

0 comments: