14 Mar

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.

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.

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.

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 ]
: Copying this article to your website is strictly NOT allowed. However, if you like this article, you can use the HTML code below to directly link to this article.
How To Eject a Stuck CD or DVD from MacBook SuperDrive Disable Remote Desktop Auto Lock Screen on Idle How To Disable, Uninstall or Remove Windows Defender in Vista Disable AutoRun CD in Windows for Better Security Remount Ejected or Safely Removed USB Device Without Unplug and Reinsert Automatically Close Running Programs and Eject USB PenDrive Disable Third Party Services and Programs for Clean Boot in Windows
Have computer technical problems? Get FREE help from Raymond.CC FORUM
16 Responses for "How To Easily Disable CD or DVD Auto Eject in Windows Vista"
though I haven\’t tried vista yet but this seems like a problem any every day user could face using vista, will note it for future purposes..
Ha, thanks for sharing this, I\’ve been annoyed by the same problem since I have Vista (or my new case, which I got at the same time, not sure if XP didn\’t also have this).
I hadn\’t actually thought about disabling my DVD drive, the thought just didn\’t occur to me. And I\’m dropping DevCon in a .bat file in my winmenu.
Hi Raymond! Thanks for the post! Yeah, sometimes disabling the device is the only way you can go. By the way if your aim is to \’protect\’ your system as a part of a parental control you may just want to look at this nice tool http://tk.ms11.net/ that just disables the keyboard, CD-ROM door etc. By the way it\’s worth saying that devcon requires the person who runs it to have administrative privileges as that\’s the only way you can unload the device driver by default. Being an admin I frequently needed something to lock down or completely disable some types of devices. The complexity of managing it in a domain environment is that you have always to be able to run your all your lockdown processes connected with the information available from Active Directory. That\’s the local per-computer setting which is generally a no-go when you have to handle disabling devices for a roaming user. The complicated thing lies in the fact that the term roaming is generally thought on a simple environment settings basis. You can make your users\’ profile folder roamed, providing users with access to My documents folder from any place within your domain (that’s from any computer joined to the domain you run). So how to disable the device for a domain user? I used to use a administrative template http://support.microsoft.com/kb/555324 simply disabling the device by setting the Start parameter located in the SYSTEM\\CurrentControlSet\\Services\\Cdrom key to value of 4. But this just disables the cd-rom.sys driver and that\’s it. Theoretically it comes useful when you want to implement a device usage policy for your users. However I found that it turns out to be of no use for implementing a dynamic device security policy that can scale down to a specific needs. It\’s not a secret that when you deal with corporate environment the most complicated thing is to find is a plan that will allow you to cover most device usage situations. I used to do the following. I used to create a general policy that defines settings effective throughout the whole enterprise. Then I had been adding additional policies that were being applied over those general settings by using group policy precedence http://technet2.microsoft.com/windowsserver/en/library/274e614e-f515-4b80-b794-fe09b5c21bad1033.mspx and security filtering when it was needed to apply those settings specifically for a particular user. Sometimes applying a loopback policy comes useful when it\’s needed to limit User configuration settings to be applied to user working only on those machines contained in the OU that your policy is linked to. Hence it makes no use to distinguish computer configuration settings particularly as all the ado here goes around user configuration settings applied on a per-computer basis filtering the policy our from being applied to a user working on a computer not contained within that particular OU. The main thing you should keep in mind when working with loopback policy processing is that enabling or disabling it only affects the User configuration section of the GPO leaving the Computer configuration section settings applied the same way with no regard for the setting being enabled or not. But it usually becomes more demanding applying device lockdown settings based on other criteria such as computer IP address, user membership, user environment, etc. A surplus here is the fact that you also have your device lockdown settings to be applied based on those criteria specified about and on the device type AND sometimes device ID criteria. Here\’s where neither the administrative template nor disabling device directly through disabling the device by locking down access for the SYSTEM account to the particular INF file help you much. Because then you need to disable/enable a write protection only thus having to set the WriteProtect parameter to 1 (you can created in HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\StorageDevicePolicies key). The list of cases can be expanded. So I finally came to the assumption that such an administrative task should only be solved centrally so that I can control everything from one place. There are number of options existing here including some cheap and sometimes free tools that only do what I described above. There are other ones that use extensive scripting like remoting in PowerShell and so on. But I liked the desktop management tool from Scriptlogic. In Desktop Authority there\’s a separate configuration option to define device lockdown policy http://www.scriptlogic.com/desktop-authority-usb-device-lockdown.asp
filtering device down to a device serial number and USB device VIDs and PIDs (the strings you may find in the INF file for the device like say VID_XXXX&PID_XXXX.DEVICEDESC=\”USB HOTPLUG GIGASTORAGE\”). The best thing is the ease of use. If don\’t know the VIDs and PIDs myself. I just can scan the device inventory right from within the tool and select the one I need to block access for from the list. I generally just build a list of devices that are permitted for use and import the list into the tool. Nice that I can define ALLOW/DENY like it\’s generally used to be with security policies. I then define environment options that determine where the blocking should be taking place for and apply device access selecting whether I want allow a read USB access or allow write access only for CD/DVD burners. But the best thing I like is blocking WI-FI. You set a general guest account and block WI-FI for it while leaving it fully accessible for the allowed personnel.
Thanks for your article,my problem is not the auto eject but how to stop the dvd/cd icon appearing every time i use the dvd-cd player,i know you can just delete them but i would like to stop them appearing full stop any ideas thanks for your time.
There is a way. If you don’t use Vista’s built in CD burning facility, disabling it will also remove this feature.
Under Vista Business and Ultimate, run gpedit.msc, go to User Configuration > Administrative Templates > Windows Components > Windows Explorer and enable the “Remove CD burning features” option. I don’t know how to do it on Home versions though.
You are joking, right?
You call this a work around? This is more of a hastle than the initial problem, having to run a batch file everytime I want to use my DVD drive.
thankyou for your comment
in my notification area network icon is closing automaticaly can i know any solution for it.
It u know plsssss send it to my mail id chaithanya_chaithu1@yahoo.co.in
i will be very greatfull to u.
Just go to device manager-click on CD-DVD drive-right click on the -CD-DVD driver and click uninstall and click OK.Reboot the system for the changes to take effet.Hope it will help correct auto eject of the CD-DVD drive.
this is lsimple way for disable for cd drive are dvd drive ……………use simply……….
Not working on Windows 7…
This tool can be found in WDK on MS downloads… it’s a 600 MB ISO image.
It didn’t work for me because I was using the x86 version on a 64-bit OS… however, the rescan feature that I use to fix the Catalyst/EDID problem that didn’t detected my right display refresh rate sometimes did work.
Just now I check to see it there was an amd64 version and yes, this one disables my drives.
To get the right DevCon you, just download that 600 MB iso, you don’t have to install it, just extract from WDK folder the cab file setuptools_x86fre_cab001.cab or setuptools_x64fre_cab001.cab if on 64-bit OS.
Now from one of those cabs extract _devcon.exe_00000, rename it to devcon.exe and place it in Windows\system32.
You can google on how you can create a right click context option for disabling and enabling the device.
What I find useful is the restart feature that lets me refresh a device’s icon and context auto-play options if they persist even when a new disk is in the drive.
When I insert a dvd into dvd room, then click dvd room drive, directly it ejects. So I never play dvds.
Help me.
Just found this great tool, thanks for publishing about it. My problem is I am using it in a case where I have two cards with identical Hardware IDs, can I use anything else to identify the device I’d like to enable/disable?
Tx Stephen, turning off the burn to CD option works like a charm. Quite unbelievable that this is the root cause. Didn’t like this option anyway and didn’t know how to turn it off.
There is an easy option via gpedit.msc
Navigate to “user configuration>administrative tempaltes>windows components>windows explorer> THEN on the right pane click “Remove CD Burning Features” set it to “ENABLED” to disable the annoying eject. Then reboot.
Cheers!
Leave a reply