Solved

Finding physical and logical drives on a PC

Posted on 2009-04-11
2
139 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

832 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