Most of the time the desktop PCs are located under the tables or in locations where we can’t get our hands easily. The most frequently used item from the desktop PC itself is the CD-ROM drive which has to be opened and closed by pressing the button on the CD-ROM. This is not convenient for all of us. So it is better to eject and insert the tray from within Windows. Here are a few methods that can be used to insert/eject the CD-ROM tray from within Windows easily:

Method 1: Using Command Line Tool: Eject

Eject is a small command line utility that can be used to insert and eject the CD-ROM tray from command prompt. Download the utility from below and extract all the files in your Windows directory (So that you may be able to access it from command prompt easily).
Now open command prompt from Start –> Run –> cmd.
Write  the following command to eject the CD-ROM tray:
C:>eject D:
(Where D is your CD-ROM Drive)

eject1
If you want to insert the ejected CD-ROM tray, then issue the following command in the command prompt:
C:>eject D: /l
(Where D is your CD-ROM Drive)

eject2

Eject (8.3 KiB, 19,978 hits)

Method 2: Using Express CD Ejector (From the status bar)

If you are not fond of using the command line utilities, you can go for this small utility. Download and install the utility from below. It will minimize itself into the status bar. If you want to eject the CD-ROM tray, just double click the icon. And if you want to insert the CD-ROM tray, just right click the status bar icon and select “Close tray”