Friday, April 18, 2008

Map Network drive using Vbscript

' save this contents to MapNetwork.vbs
Option Explicit
Dim objNetwork
Dim strDriveLetter, strRemotePath
strDriveLetter = "J:"
strRemotePath = "\\10.90.2.3\e$"

Set objNetwork = CreateObject("WScript.Network")

objNetwork.MapNetworkDrive strDriveLetter, strRemotePath
WScript.Quit

No comments: