Listing ALL mapped network drives

barse

Member
Joined
Jan 20, 2005
Messages
6
Programming Experience
5-10
Hi,
I'm trying to get a list of all my mapped drives (using VB 2005).

The getLogicalDrives function will only list the drives that are physically on my machine and not the mapped network drives.

Is there any way of getting this list?

In the registry under HKey_CURRENT_USER the network key seems to have this info but when I try to access the sub keys it returns a blank (some security setting?)

Any help would be gratefully received.
 
Thanks JohnH.

I just realised that my problem lies with the fact that I'm trying to do this from a windows service. There's probably some sort of security issues I have to deal with...

Any advice?
 
see this recent thread http://www.vbdotnetforums.com/showthread.php?t=7812

pparker, did it by logging the service in with user account, enabled the service to interact with desktop, he used Win32 API WNetAddConnection2. Note his last post where he tells the mapping is only valid for the service session, it will not be visible in the user desktop.
 
Back
Top