You have to include the server name in the statement .
an example of the one I'm using is below:
WshNetwork.MapNetworkDrive "S:", "\\Fiusray108\Public"
I hope this helps you out. If there drive is already mapped you will
receive an error message that will cause your script to stop. I have
included the way I check for drives and map them below:
If fso.DriveExists("S") Then
WshNetwork.RemoveNetworkDrive "S:"
End If
WshNetwork.MapNetworkDrive "S:", "\\Fiusray108\Public"
Thank you,
Lee Tate
Quote:
> I am changing our login scripts from batch files to vb scripts. In my
batch
> file I used the line NET USE F: /HOME to map the home dir specified in the
> users profile. How do I do this using vb. I tried the following and it
does
> not work:
> Set WshNetwork = WScript.CreateObject("WScript.Network")
> WshNetwork.MapNetworkDrive "F:", "/HOME"
> Any help would be appreciated.
> Thanks, Sol.