Discussion:
Network drives in DrivelistBox.
(too old to reply)
b***@gmail.com
2016-03-28 13:02:17 UTC
Permalink
Hi all.

Networkdrives are not displayed in my DrivelistBox.
I googled a lot, but did not find a way to get them displayed.
Not even drives with a driveletter.
Guess that there is NO solution to this. Or is there?
Bert.
Tim Rude
2016-03-28 20:30:16 UTC
Permalink
Post by b***@gmail.com
Hi all.
Networkdrives are not displayed in my DrivelistBox.
I googled a lot, but did not find a way to get them displayed.
Not even drives with a driveletter.
Guess that there is NO solution to this. Or is there?
Bert.
If you're talking about VB6, mapped network drives are shown the same as
any other drive that's assigned a drive letter.

The question is, are the network drives mapped in the user account
you're running under? If you're running within the VB IDE in
administrator mode and your drive mapping was done in the regular user
mode, you won't see those mapped drives since you're running as a
different user. Drive mapping is per-user, not per-machine.
b***@gmail.com
2016-03-29 10:38:07 UTC
Permalink
Thank you for your reply, Tim and yes, I'm talking about VB6.
I think that you're pointing at the right cause.
I didn't know that drivemapping is per-user.
In Windows Explorer I do see the drivemapping, but not
in my VB6 application. That's a bit weird (I think), but
I am possibly another user when I start the application.
Could it be that my way of determining which user I am
in the application is wrong? I use the following:

Dim WshNetwork
Set WshNetwork = CreateObject("Wscript.Network")
ThisUser = WshNetwork.UserName

Should I use a different procedure?
Bert.

Loading...