Solved

Finding physical and logical drives on a PC

Posted on 2009-04-11
2
137 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
Comment Utility
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
Comment Utility
Exactly what I want. Thank you
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

771 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

11 Experts available now in Live!

Get 1:1 Help Now