title: How to programmatically discover mapped network drives on system and their server names?
body: <p>I'm trying to find out how to programmatically (I'm using C#) determine the name (or i.p.) of servers to which my workstation has current maps.  In other words, at some point in Windows Explorer I mapped a network drive to a drive letter (or used "net use w: " to map it).  I know how to get the network drives on the system:</p>
  
  <pre><code>DriveInfo[] allDrives = DriveInfo.GetDrives();
  foreach (DriveInfo d in allDrives)
  {
      if (d.IsReady &amp;&amp; d.DriveType == DriveType.Network)
      {
      }
  }
  </code></pre>
  
  <p>But the DriveInfo class does not have properties that tell me what server and shared folder the mapped drive is associated with.  Is there somewhere else I should be looking?  </p>