I most of the time find mapped drives to be a bad way to go and I use UNC's
in my program whenever possible. The whole process breaks down quickly on a
of mapped drives from the client. UNC's are a bit slower (don't know why),
but a whole lot more reliable and easier to resolve.
"Larry Smith" wrote:
Drive mappings exist only under an accout, which created them. Read
"Remarks" section in documentation for `WNetAddConnection2' function.
That's not true actually. While this entire area is flaky (it has its
roots in the SMB=Server Message Block protocol), a drive mapping is a
machine-wide alias for a UNC path.
It was like this for WinNT/2K. Starting from WinXP/2K3 each user has its
own set of drives:
KB180362 - "INFO: Services and Redirected Drives"
http://support.microsoft.com/kb/180362/
<quote>
On Windows NT and on Windows 2000, drive letters are global to the system.
All users on the system share the letters A-Z. Each user does not get
their own set of drive letters. This means a user can access the
redirected drives of another user if they have the appropriate security
access.
</quote>
This is the exact situation that you describe. Following is description
for XP/2K3:
<quote>
On Windows XP and on Microsoft Windows Server 2003, each logon session
receives its own set of drive letters, A through Z. Therefore, redirected
drives cannot be shared between processes that are running under different
user accounts.
</quote>
Alex