Posted 14 December 2012 - 15:59
I am trying to create a VB script that will help map network drives. I can get single drive mappings to map no problems but when I try to do this for multiple drive mappings it errors out on me? also try to make it where if there is an existing drive drive letter assigned to ignore and continue on with the mappings? Listed below is the script that I have been working with - Thanks in advance for looking at this...
Dim strDriveLetter, strRemotePath
strDriveLetter = "F:"
strRemotePath = "\\Network share drive\"
' Purpose of script to create a network object. (objNetwork)
' Then to apply the MapNetworkDrive method. Result J: drive
Set objNetwork = CreateObject("WScript.Network")
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath
' End of Example VBScript.
msgbox "Done, click OK"