I have been searching and have tried multiple pieces of code on this site and others with no results yet, very close but not exactly yet.
I want to map one drive at startup for all users. But I don't want anything popping up saying its been mapped or another drive disconnected first, etc... Just want it to disconnect the s: drive if they have it already mapped and map the new s: drive. All silent...
This small VB code worked great, but I don't know the piece to add to disconnect drive if in use:
Set objNetwork = CreateObject("WScript.Netw
ork")
objNetwork.MapNetworkDrive
"S:" , "\\servername\shared"
Running on MS Windows Server 2003. Thanks.
Start Free Trial