|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
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. 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 "Terry Olsen" <tolse***@hotmail.com> schrieb: <URL:http://dotnet.mvps.org/dotnet/code/filesystem/#DriveType>> How can I find all CD/DVD drives on a system? <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/> "Terry Olsen" <tolse***@hotmail.com> wrote in See here:news:euIwQyufGHA.4776@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. > > 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. |
|||||||||||||||||||||||