title: Map network drive with a Python service
body: <p>(There are other questions along these lines but none of them have any real answers, let alone answers dealing with python...)</p>
  
  <p>I have a Windows Service (XP SP3) written in Python that needs to be able to mount a network drive for ALL users.  I tried using <code>net use</code> with <code>subprocess</code> (even with the full path to net.exe), but given that your service runs as the SYSTEM user, <code>net</code> is pretty unhappy with you (it complains about the lack of a user context).  There's probably a way to do this via WMI, but I haven't been able to figure it out.</p>
  
  <p><strong>EDIT</strong>:  Actually, maybe you can't do this with WMI.  <a href="http://technet.microsoft.com/en-us/library/ee156610.aspx" rel="nofollow noreferrer">This article</a> seems to indicate that this functionality is available in WSH but not WMI.  Maybe some way to use <code>net</code> or <code>map</code> to do this after all?</p>