Sean.hulbert
n00b
- Joined
- Jan 2, 2012
- Messages
- 16
Hello below you will find a useful script for mapping a network drive.
I know there are different ways of doing this but this is super simple and works for XP to 2008
'Drive Map and File copy from remote host to local host
'Written By Sean Hulbert
'March 06 2008
Dim strDriveLetter1, strRemotePath1, strUser, strPassword, strProfile
'Drive letter will remain static
strDriveLetter1 = "z:"
strRemotePath1 = "\\x.x.x.x\sharename"
strUser = "usernamehere"
strPassword = "Passwordhere"
strProfile = "false"
Set objNetwork = WScript.CreateObject("WScript.Network")
objNetwork.MapNetworkDrive strDriveLetter1, strRemotePath1, _
strProfile, strUser, strPassword
WScript.Echo "Server connection has been configured Files downloaded"
WScript.Quit
I know there are different ways of doing this but this is super simple and works for XP to 2008
'Drive Map and File copy from remote host to local host
'Written By Sean Hulbert
'March 06 2008
Dim strDriveLetter1, strRemotePath1, strUser, strPassword, strProfile
'Drive letter will remain static
strDriveLetter1 = "z:"
strRemotePath1 = "\\x.x.x.x\sharename"
strUser = "usernamehere"
strPassword = "Passwordhere"
strProfile = "false"
Set objNetwork = WScript.CreateObject("WScript.Network")
objNetwork.MapNetworkDrive strDriveLetter1, strRemotePath1, _
strProfile, strUser, strPassword
WScript.Echo "Server connection has been configured Files downloaded"
WScript.Quit