how to list drive type in c# when there is no drive letter??

Posted on 2011-03-08
Last Modified: 2013-12-17
just same as title says, i'm trying to create a little program that can assign drive letter to removable drive that has no drive letter assigned by system automatically.
it is mainly under windows.

i have got most of part, but i could not find a way to test if a usb removable drive has drive letter or not.
how can I do this in c# ?
Question by:Ikelca
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2

Expert Comment

ID: 35077884
check out a command called 'fsutil'
It's a windows command that contains a lot of information about windows internals. You can invoke this command from within your C# code by spawning a new process and capturing its output. If you can't capture the output, have the command pipe its results to a text file and then read the text file for your results.

Hope this'll get you started.

Author Comment

ID: 35078251
i rather not to invoke any external windows programs...........
can this be done with c# only?

Accepted Solution

dimaj earned 500 total points
ID: 35078331
I briefly scanned through these links and they might have bits and pieces that will help you with your problem:

Author Comment

ID: 35079959
nvm, i found a way of doing it thru WMI

Author Comment

ID: 35079961

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

Suggested Solutions

Title # Comments Views Activity
Create a Dropdown list with sub group 10 43
Learning About The VB.NET TableLayoutPanel Control 5 42
C# DateTime Help 6 46
Manage big list of parameter list 8 19
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

732 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