Hi,
To get a list of drives you can use the wmi or the environment class.
The environment class only returns the drive letters use the wmi to get info
about the drive.
Environment class
For Each strDrive As String In Environment.GetLogicalDrives
Trace.WriteLine(strDrive)
Next
WMI
Add a reference to system.management to your app
' Add a Reference to System.Management
Dim moReturn As Management.ManagementObjectCollection
Dim moSearch As Management.ManagementObjectSearcher
Dim mo As Management.ManagementObject
moSearch = New Management.ManagementObjectSearcher("Select * from
Win32_LogicalDisk")
moReturn = moSearch.Get
For Each mo In moReturn
Dim strOut As String
strOut = String.Format("Drive {0} - Drive Type {1}", mo("Name"),
mo("DriveType"))
Trace.WriteLine(strOut)
Next
http://msdn.microsoft.com/library/de...ogicaldisk.asp
Ken
----------------------------------
"Dennis" <De****@discussions.microsoft.com> wrote in message
news:11**********************************@microsof t.com...
I am trying to use the DriveClass to get the information for a drive but
can't seem to get the syntax, etc. correct.
I tried:
dim drives as DrivesClass = ??????????? tried NEW but it's private
dim d as drive
for each d in drives
next
--
Dennis in Houston