Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 146
  • Last Modified:

Finding physical and logical drives on a PC

I need to be able to find what drives, physical and logical are on a PC. I don't need to get drives mapped on othe rmachines.

I have searched EE and found 1000s of answers, some dating back to 1997, but cannot find anything specific to my needs. Many of the answers I have found relate to C++, VBScript, C# etc but no VB.Net type answers.

Can someone please point me in the right direction?

Many thanks
0
jindalee
Asked:
jindalee
1 Solution
 
jpaulinoCommented:
Is this what you want ?
        Try
            For Each d As IO.DriveInfo In IO.DriveInfo.GetDrives()
                Debug.WriteLine(String.Format("Drive: {0}, Type:{1}", d.Name, d.DriveType))
            Next
        Catch ex As Exception
            ' erro message
        End Try

Open in new window

0
 
jindaleeAuthor Commented:
Exactly what I want. Thank you
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now