I was expecting this to be easy but it seems that it is not... all I want to do is loop through all drives on a computer and if the drive is a network drive then get the UNC path that this network drive maps to. Simples.

I was expecting to just do this:

vb.net Code:
  1. For Each drv In IO.DriveInfo.GetDrives()
  2.             If drv.DriveType = IO.DriveType.Network Then
  3.                 MessageBox.Show(drv.RootDirectory.ToString)
  4.             End If
  5. Next

but this just outputs the drive letters like so:
Code:
F:
G:
I:
'etc
So does anyone know of any way to get the path that the network drive maps to (e.g \\server\someshare\somedirectory) without using WMI ?

Thanks
Chris