• 0

VB Scripting Question?


Question

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 objNetwork

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

WScript.Quit

' End of Example VBScript.

msgbox "Done, click OK"

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.