Hello, I'm trying to get the label of some network resources mapped as drives. When I use DriveInfo.GetDrives(), local volumes have the VolumeLabel filled parameter as expected, but in network drives it is an empty string. How can I get those labels?
+1
A:
You can use WMI for this - not sure of the exact query (it's been a while), but here's an example of how to get network drive free space:
http://en.csharp-online.net/Network_Drive_Free_Space
I think replacing 'name' with 'VolumeName' in that example will give you what you need.
WMI reference here just in case:
http://msdn.microsoft.com/en-us/library/aa394173(VS.85).aspx
Mark B
2008-12-05 10:05:43
It works, thank you very much
Gonzalo Quero
2008-12-05 10:25:13