Hello all,
I have a script that will map a drive on my machine to a member server. However I haven't been able to configure the script to "reconnect at logon" so everytime I reboot my machine I lose the drive. Any ideas on how I can incorporate that command into my already existing script?
script I'm currently using is below:
********
Option Explicit
Dim objNetwork
Dim strDriveLetter, strRemotePath
strDriveLetter = "O:"
strRemotePath = "\\rw-fs-cl\polling"
' Purpose of the script to create a network object. (objNetwork)
' Then to apply the MapNetworkDrive method. Result O: drive
' If drive mapping already exist you'll get an error no harm no foul
Set objNetwork = CreateObject("WScript.Network")
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath
' Extra code just to add a message box
WScript.Echo " Successfully mapped to poller "
WScript.Quit
' End of MapNetworkDrive Example Logon Script.
**********
Thanks!!!
I have a script that will map a drive on my machine to a member server. However I haven't been able to configure the script to "reconnect at logon" so everytime I reboot my machine I lose the drive. Any ideas on how I can incorporate that command into my already existing script?
script I'm currently using is below:
********
Option Explicit
Dim objNetwork
Dim strDriveLetter, strRemotePath
strDriveLetter = "O:"
strRemotePath = "\\rw-fs-cl\polling"
' Purpose of the script to create a network object. (objNetwork)
' Then to apply the MapNetworkDrive method. Result O: drive
' If drive mapping already exist you'll get an error no harm no foul
Set objNetwork = CreateObject("WScript.Network")
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath
' Extra code just to add a message box
WScript.Echo " Successfully mapped to poller "
WScript.Quit
' End of MapNetworkDrive Example Logon Script.
**********
Thanks!!!