Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Frequently I have a DVD-disk left in the DVD-ROM drive, which I am kind of reluctant to take out. I have Windows-7 OS which freezes constanly checking on that disk. I do not need that constant checking, because I know what disk I have in the drive.

Is there a way to turn off the DVD-drive when I do not need to use it?

Thank you.

share|improve this question
up vote 4 down vote accepted
  1. See my answer here for a link to DevCon for Win7.

  2. Use devcon find *CDROM* or devcon listclass CDROM at an elevated command prompt to see a list of installed physical and virtual optical drives, for example:

    IDE\CDROMSAMSUNG_DVD-ROM_SD-608__________________2.2_____\4&13B4AFD&0&0.0.0: SAMSUNG DVD-ROM SD-608
    2 matching device(s) found.
  3. Use the complete device ID string returned or figure out which portion(s) of the string returns only the drive you want to enable/disable. For example, a sub-string such as *CDROMSAMSUNG* or *CDROM*608* is sufficient to uniquely identify the physical drive, such that
    devcon find *CDROMSAMSUNG* returns:

    IDE\CDROMSAMSUNG_DVD-ROM_SD-608__________________2.2_____\4&13B4AFD&0&0.0.0: SAMSUNG DVD-ROM SD-608
    1 matching device(s) found.
  4. The rest is easy! Just use devcon disable *CDROMSAMSUNG* and
    devcon enable *CDROMSAMSUNG* to do what you want.

    Additionally, devcon status *CDROMSAMSUNG* will tell you whether "Driver is running" or "Device is disabled".

Edit: You can create ToggleCD.bat as follows:

devcon status *CDROMSAMSUNG* | find "Driver is running" && devcon disable *CDROMSAMSUNG* && goto :EOF
devcon status *CDROMSAMSUNG* | find "Device is disabled" && devcon enable *CDROMSAMSUNG* && goto :EOF

Ensure devcon.exe is in a directory that's in your PATH (for example, copy it to your Windows directory), and obviously replace *CDROMSAMSUNG* with the actual string that you identified using the instructions above.

To keep UAC on and yet bypass the prompt for the shortcut to the batch file, read the Create Administrator Mode Shortcuts Without UAC Prompts in Windows 7 or Vista article.

share|improve this answer
Hi, Karan! Thank you for your answer. I did not have a chance to check it today, though I have downloaded devcon already through the link that you provided. I will test it tomorrow, hopefully. – GreenBear Mar 7 '13 at 1:36
@GreenBear: It should work just fine, I made sure to test it on my system before posting. Let me know how it goes. – Karan Mar 7 '13 at 1:37
Hi, Karan! Devcon is working! But I have a few more questions. I am thinking of making a "bat" file "Toggle Drive Status" - user clicks a shortcut on a desktop an the drive is either disabled or enabled. First question: is it possible to read output from the "devcon status" command and depending on that output run either "devcon disable" or "devcon enable"? My "DOS language" is very very rusty. Second: is it possible to turn off UAC notifications for the "bat" file and for the devcon.exe? I do not want to turn UAC completely off for all other stuff. – GreenBear Mar 8 '13 at 2:28
Third question: is it possible to set so, that when a user clicks the shortcut, the "bat" file and devcon are run "as administrator"? I created the shortcut, but for some reason the "run as administrator" checkbox is greyed (disabled). Thank you again. I would not bother you, but since you are an expert, maybe these are easy for you, or if you can just provide me a link, that will do as well. – GreenBear Mar 8 '13 at 2:28
@GreenBear: Check the edit above. – Karan Mar 8 '13 at 3:12

Yes there is, you can disable DVD-drive. Go to Control Panel -> Administrative tools -> Computer management -> click on Device manager, select DVD/CD-ROM drives, right click on your drive and click "Disable". Enable it again when you want to use it :)

share|improve this answer
Hi, Davidenko! Thanks for the help! This works, but what I would like more is a sort of shortcut on the desktop to save the time. So the best would be a programm, a bat file or a script, and would be great if it could also report a status. Any more ideas? Can this be done, say in a script? – GreenBear Mar 5 '13 at 13:24
I can help you when I get home, I'm currently at work, on XP :) – Davidenko Mar 5 '13 at 13:26
Thanks. I will be waiting. – GreenBear Mar 5 '13 at 13:32
I just remembered, try if it's constantly checking on that disk – Davidenko Mar 5 '13 at 13:50
Thanks for the hint. Sadly, "The Local Group Policy Editor feature is not included in the Windows 7 Starter, Home Basic, and Home Premium editions." I am a happy owner of the Home Basic :( – GreenBear Mar 5 '13 at 14:18

Click Start and type (without quotes) "diskmgmt.msc". Right click the result and select Run as Administrater. Follow the UAC prompt and Disk Manager will open. Find your SATA CD/DVD Drive and right click it. There should be an option to disable it.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .