Thursday, December 10, 2009

Windows 2003 AD - Map Network Drive



MapNetworkDriveIS.vbs

Option Explicit

Dim objNetwork
Dim strDriveLetter, strRemotePath
Dim strDriveLetter2, strRemotePath2

strDriveLetter = "I:"
strDriveLetter2 = "S:"
strRemotePath = "\\AX-AD1\IT"
strRemotePath2 = "\\AX-AD1\AX Training"

' Purpose of script to create a network object. (objNetwork)
' Then to apply the MapNetworkDrive method.
' Results I and S drives
Set objNetwork = CreateObject("WScript.Network")objNetwork.MapNetworkDrive strDriveLetter, strRemotePath
objNetwork.MapNetworkDrive strDriveLetter2, strRemotePath2
WScript.Quit

No comments:

Post a Comment