I'm trying to make a logon script for server 2003 to map a network drive.
I found the below example using google but doesn't seem to work: -
the network path works fine. Any ideas please?
I found the below example using google but doesn't seem to work: -
' MapNetworkDrive.vbs
' -----------------------------------------------------------------'
Option Explicit
Dim objNetwork
Dim strDriveLetter, strRemotePath
strDriveLetter = "U:"
strRemotePath = "\\Server2003\Storage\PSmith Documents$\"
' 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.
the network path works fine. Any ideas please?