Ikelca
asked on
how to list drive type in c# when there is no drive letter??
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# ?
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# ?
ASKER
i rather not to invoke any external windows programs...........
can this be done with c# only?
can this be done with c# only?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
nvm, i found a way of doing it thru WMI
ASKER
thanks
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.