Home All Groups Group Topic Archive Search About

GetLogicalDrives function does not return mapped drives

Author
7 Nov 2006 11:45 PM
RMB
FW 1.1 VB.Net

When I make a call to either system.environment.getlogicaldrives or
System.io.Directory.GetLogicalDrives from a Windows service, my mapped drives
are not returned. 

I also tried WMI WIN32_MappedLogicalDisk, but unfortunately this does not
work with W2K. 

Any ideas why GetLogicalDrives does not return my mapped drives when called
from a Windows service?

Thanks

Author
8 Nov 2006 5:11 AM
William DePalo [MVP VC++]
Show quote
"RMB" <R**@discussions.microsoft.com> wrote in message
news:CC7871EC-4D3E-4A16-A569-7EB57CC7151B@microsoft.com...
> FW 1.1 VB.Net
>
> When I make a call to either system.environment.getlogicaldrives or
> System.io.Directory.GetLogicalDrives from a Windows service, my mapped
> drives
> are not returned.
>
> I also tried WMI WIN32_MappedLogicalDisk, but unfortunately this does not
> work with W2K.
>
> Any ideas why GetLogicalDrives does not return my mapped drives when
> called
> from a Windows service?

On WIndows XP and Windows Server 2003, each logon session gets its own set
of drive letters. This differs from the earlier behavior in which there were
26 drive letters system-wide.

Details are here:

http://support.microsoft.com/kb/180362

Short story: use UNC paths in services.

Regards,
Will
Author
8 Nov 2006 4:38 PM
RMB
Thanks Will.  The KB article provides some clarity.



Show quote
"William DePalo [MVP VC++]" wrote:

> "RMB" <R**@discussions.microsoft.com> wrote in message
> news:CC7871EC-4D3E-4A16-A569-7EB57CC7151B@microsoft.com...
> > FW 1.1 VB.Net
> >
> > When I make a call to either system.environment.getlogicaldrives or
> > System.io.Directory.GetLogicalDrives from a Windows service, my mapped
> > drives
> > are not returned.
> >
> > I also tried WMI WIN32_MappedLogicalDisk, but unfortunately this does not
> > work with W2K.
> >
> > Any ideas why GetLogicalDrives does not return my mapped drives when
> > called
> > from a Windows service?
>
> On WIndows XP and Windows Server 2003, each logon session gets its own set
> of drive letters. This differs from the earlier behavior in which there were
> 26 drive letters system-wide.
>
> Details are here:
>
> http://support.microsoft.com/kb/180362
>
> Short story: use UNC paths in services.
>
> Regards,
> Will
>
>
>

AddThis Social Bookmark Button