Can I hide mapped drive with vb code

MBMSOFT

Registered User.
Local time
Today, 09:49
Joined
Jan 29, 2010
Messages
90
So I do map drive on this way and it is successful ...
Code:
Dim FSO As Object
Dim objFile As Object
Dim objFileS As Object
Dim WshNet As Object
persistent = false
set objNetwork = CreateObject("WScript.Network") 

objNetwork.MapNetworkDrive "driveletter:", "\\server\sharename", persistent, "username", "password"
But I need to have mapped drive hidden from the client users
So I red that i might be possible if put $ after the share folder

Code:
objNetwork.MapNetworkDrive "driveletter:", "\\server\sharename$", persistent, "username", "password
"
but it does not work..
the other way is to set values in win registry, but I don't like that way... i would preffer the first way... any idea if I'm doing something wrong
 
Last edited:
The $ in the share name hides the UNC share from being listed among the network drives.

AFAIK there is no way to hide the maping.
 

Users who are viewing this thread

Back
Top Bottom