Solved

Finding physical and logical drives on a PC

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

830 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