Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to "reconnect at logon"....?

Status
Not open for further replies.

matrix101

MIS
Jun 5, 2007
60
US
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!!!









 
what about this ?
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath[!], True[/!]

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top