title: Determine Domain and username used to map a network drive
body: <p>Using Windows 7 Enterprise with SP1, but I'm hoping to get a generic answer that would apply to Windows XP/2003/2008/Vista/7.  </p>
  
  <p>From a command prompt, I execute a <code>net use</code> command to map the Z: drive to a share on another computer, but I don't use my current credentials, I specify a different domain and user to map the drive.</p>
  
  <pre>
  net use z: \\rd-pc2037\C_DRIVE password /user:rd-pc2037\Administrator
  </pre>
  
  <p>The command completes successfully.  Now that the drive is mapped, how can I find what Domain and Username I used to successfully map the drive?  I can't seem to find what I want with the <code>net use</code> command.</p>
  
  <pre>
  C:\Users\rdomarat>net use 
  New connections will not be remembered.
  
  Status       Local     Remote                    Network
  ---------------------------------------------------------------------------- 
  OK           Z:        \\rd-pc2037\C_DRIVE       Microsoft Windows Network 
  The command completed successfully.
  
  C:\Users\rdomarat>net use Z: 
  Local name        Z: 
  Remote name       \\rd-pc2037\C_DRIVE 
  Resource type     Disk 
  Status            OK
  # Opens           0
  # Connections     1 
  The command completed successfully.
  </pre>
  
  <p>Checking the properties of the share in Windows Explorer and looking at the security tab showed me what permissions different people would have, but I didn't see how which <code>DOMAIN\User</code> I had used.  I searched through the registry with limited success as well.</p>
  
  <p>Any thought?</p>