Solved

Finding physical and logical drives on a PC

Posted on 2009-04-11
2
138 Views
Last Modified: 2013-11-27
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
Comment
Question by:jindalee
2 Comments
 
LVL 48

Accepted Solution

by:
jpaulino earned 500 total points
ID: 24125015
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
 
LVL 1

Author Closing Comment

by:jindalee
ID: 31569257
Exactly what I want. Thank you
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now