Map network drives--Plzz replyy
Visual Basic
2
Posts
2
Posters
0
Views
1
Watching
-
How can I map network drives in vb.net?I tried using WNetConnectionDialog() but it didnt work out.Plzzz suggest a method.
Here Try this. This is the code to add the network Drive
Dim WshNetwork as Object WshNetwork = CreateObject("WScript.Network") WshNetwork.MapNetworkDrive("L:", "\\Server\Resource")
Of course you can have the letter be whatever and just fill in your resource
Here is the Code to remove it after the object is createdWshNetwork.RemoveNetworkDrive("L:")
And of course it the letter that you specified earlier. I hope this helps