When I started using Windows Vista, one of the cool feature I noticed was my DVD-RW drive automatically ejects when I click on the drive in Windows Explorer! There’s also a window saying “Insert a disc. Please insert a disc into drive E:.” How nice, Vista is supposedly smart enough to eject when there are no disc in the drive. Well, the coolness only lasted for a while and it became an annoyance because I will occasionally wrongly click on the DVD-RW drive when I actually wanted to access my hard drive. When it ejects, I had to manually close it. The worst part was my computer case has a cover that covers the DVD drive. So whenever I accidentally click on the DVDRW drive, the DVDRW tray will eject and hit on my computer case cover which I don’t think it is pleasant to the hardware.

Disable Vista Insert A Disc

I tried searching for a setting or registry hack that can turn off my DVDRW drive auto eject in Windows Vista but couldn’t find any. It seems that this “feature” is hard coded and there is no way to disable it. I don’t believe that it can’t be done so I did a little research, and I found an easy way to disable Windows Vista CD/DVD drive auto eject feature.

Vista auto eject on empty optical drive is a default behavior and there is no setting you can change. It’s assumed that when you try to access the optical drive that if no disk is present then you would want the opportunity to insert one. Even though there is no setting to disable auto eject, I found some suggested workarounds you can use to avoid CD/DVD rom auto ejecting in Vista.

1. Right click on the drive icon instead.
2. Leave a disc in the drive so if you accidentally click it, it will just open the disc instead of the drive itself.
3. Disable the DVD drive in Device Manager if you do not use it often and enable it when you want to use it.

First method doesn’t really help if we accidentally left click on the DVD drive. Second method works but I don’t want to leave a disc in the drive. I think the third method works best but it can be very troublesome manually enabling CD/DVD drive in device manager when you need to use it and then disable it again after finished using.

To disable CD/DVD drive in Device Manager, go to Control Panel > System > Hardware tab > Device Manager. Expand DVD/CD-ROM drives, right click on the drive and select Disable.
Disable Vista auto eject

To make our lives easier, Microsoft has a tool called “DevCon” to automate doing that. The DevCon utility is a command-line utility that acts as an alternative to Device Manager. Using DevCon, you can enable, disable, restart, update, remove, and query individual devices or groups of devices. So with DevCon, we can write a simple batch script to enable or disable CDROM drive. When using devcon to enable or disable a device, you’ll first need to know the specific hardware or instance ID. To find for the hardware ID, follow the same step as above except you should select Properties instead of Disable. Once the device property window is shown, go to Details tab, click the drop down menu and select Hardware Ids.

Find CD DVD ROM Hardware ID

As you can see, the hardware ID for my DVD-RW drive is very long. Instead of typing the whole ID, we can use asterisk (*). The command to disable my DVDRW drive using devcon is:

devcon.exe disable *cdrom*


This command will disable all devices that have a hardware ID that contains cdrom. If you have 2 or more CD/DVD drives, you should use a more detailed hardware ID.

To enable CD/DVD drive using devcon:

devcon.exe enable *cdrom*


What you can do is create 2 batch file, one with the name enable-cd.bat and the other one disable-cd.bat. Insert the commands above to the batch file and put it together with devcon.exe. Whenever you want to enable cd/dvd drive, just run enable-cd.bat. To disable cd/dvd drive, run disable-cd.bat.

Disable vista auto eject

I think this is currently the best workaround to disable the annoying Windows Vista auto eject feature. Oh, DevCon is free and currently supports Windows 2000, XP, 2003 Server and Vista.

[ Download DevCon ]

Technorati Tags: , , , ,