0

I have done a vb script to map the network drives. It works fine for me. But when I checked with a couple of other PCs, it doesn't work. Could anybody tell me why this is happening?

Here is the code:

Dim WSHNetwork
Set WSHNetwork = WScript.CreateObject("WScript.Network")

On Error Resume Next

WSHNetwork.RemoveNetworkDrive "Q:", True

WSHNetwork.RemoveNetworkdrive "P:", True	

WSHNetwork.MapNetworkDrive "Q:" , "\\ServerName\FolderName"

Set WSHNetwork = Nothing

WScript.Quit
4
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by sandeep_chalke
0

This forum is meant for unix shell scripting. There is a forum for vb here, and this question should be asked there.

I have already asked the admins to move this.

0

The code which you are using seems to be correct. Can you please let me know the following details-
1) When you say "it does not work", what does that mean? Do you get any errors, if yes please post the error message.
2) Do you run this as a logon script? If yes, run the same script on command prompt and post the result.
3) Which version and build of WSH are you using?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.