VB Script To Map Drive

Home Forums Scripting General Scripting VB Script To Map Drive

Viewing 1 post (of 1 total)
  • Author
  • Avatar

    I am trying to create a script to map a network drive then open a folder displaying the contents of the newly mapped drive. This is the script I have (I am a newbie) but it does not open…it generates the error ‘Untermminated string constant’ code: 800A0409

    Dim shell
    Dim objNetwork
    Set objNetwork = WScript.CreateObject(“WScript.Network”)
    strLocalDrive = “L:”
    strRemoteShare = “”
    strPer = “FALSE”
    strUsr = “DiggityDogDomaincraymond”
    strPas = “password”
    objNetwork.MapNetworkDrive strLocalDrive, strRemoteShare, strPer, strUsr, strpas
    Set shell = wscript.CreateObject(“ShellApplication)
    shell.Open “\”
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.