I have this script I found on the net and it maps the drives great but if a drive isn't already mapped it give the error "this network connection does not exist". I would like the script to be able to check if the drive is mapped and if it is disconnect it and remap it using the new file path. But I also want it to be able to map the drive if the mapping does not exit. Here is my script
Dim objNetwork, strRemotePath1, strRemotePath2
Dim strDriveLetter1, strDriveLetter2
strDriveLetter1 = "F:"
strDriveLetter2 = "N:"
strRemotePath1 = "\\vcna-server-06\root"
strRemotePath2 = "\\vcna-server-04\projects"
Set objNetwork = CreateObject("WScript.Network")
'Remove original Drive
' Section which maps two drives, F: and N:
objNetwork.MapNetworkDrive strDriveLetter1, strRemotePath1
objNetwork.MapNetworkDrive strDriveLetter2, strRemotePath2
Any help would be appreciated. Thanks