473,322 Members | 1,401 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

How to find all CD/DVD & CD/DVD-RW drives?

How can I find all CD/DVD drives on a system? And how can I tell if they are
RW's?

Thanks.
May 24 '06 #1
3 1197
Try this

Dim objQuery As ObjectQuery
Dim objSearcher As ManagementObjectSearcher
Dim scope As ManagementScope = New ManagementScope
Dim strComputerName As String = "."
Dim queryCollection As ManagementObjectCollection

scope = New ManagementScope("\\" & strComputerName &
"\root\cimv2")
scope.Connect()
objQuery = New ObjectQuery("Select * From Win32_CDROMDrive")
objSearcher = New ManagementObjectSearcher(scope, objQuery)
queryCollection = objSearcher.Get()
For Each m As ManagementObject In queryCollection
MsgBox(m("Drive") & " " & m("Description"))
Next

Hope this will helps

May 24 '06 #2
"Terry Olsen" <to******@hotmail.com> schrieb:
How can I find all CD/DVD drives on a system?


<URL:http://dotnet.mvps.org/dotnet/code/filesystem/#DriveType>
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=setcddoorstatus&lang=en>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
May 24 '06 #3
"Terry Olsen" <to******@hotmail.com> wrote in
news:eu**************@TK2MSFTNGP05.phx.gbl:
How can I find all CD/DVD drives on a system? And how can I tell if
they are RW's?

Thanks.


See here:
http://www.vbforums.com/showthread.php?t=397792

You can detect whether each drive can read and write the usual suspects
(cd, cdrw, dvd, dvdrw, dvdram). The drive need to support the mmc standards
(www.t10.org), but most do.
May 27 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: James | last post by:
Hi, I am making a basic DVD shop and after having produced code which displays a list of DVDs from my database, I implemented a search facility which enables the user to search by title, director...
5
by: Krustov | last post by:
For use in a install.php What would be the best way to do it .
2
by: Lane | last post by:
I'm completly LOST !!! I need to create a datagid with data from a database which i can do, but i need a additional row appended to the grid as a textbox for information to be gathered and stored. ...
3
by: Lance | last post by:
I've noticed that controls that are contained in MDI child forms fail to raise MouseLeave events if the MDI child form's MdiParent property is set to Nothing (after it was set to an existing MDI...
5
by: mcfarlandorama | last post by:
Hello, How do I play a DVD from a website? I am starting with zero knowledge of media but have HTML Experience. I found out that Windows Media Player won't play the DVD. Do I suggest everyone...
3
by: hambone2123 | last post by:
hi, im using windows vista and i tried burning a movie to dvd and when i play the dvd in my dvd player its in black and white and the screen jumps up and down what should i do
4
Dvd
by: bheki | last post by:
Greetings I have a c++ problem that i have to solve in one week, Can anyone of you guys help? The program should be-menu-driven with the following options:
17
by: jmarcrum | last post by:
Hi! I am trying to write a DVD class that will model a DVD in several ways. I wrote a test driver program to exercise my class. I want each DVD to have a fake serial number. The first number...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.