![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Map Network Drive with Remember Password Hello, How can the following VBScript be changed to remember the password so that after the PC is restarted the mapped drive is still connected? [VBScript -- Begin] On Error Resume Next Dim oNetwork Set oNetwork = CreateObject("WScript.Network") strDrive = InputBox("Do NOT CHANGE Network Drive Letter:", "Network Drive Letter", "Z:") strPath = InputBox("DO NOT CHANGE Network Path:", "Network Path", "\ \server\share") Set strUser = InputBox("Enter User Name:", "User Name", "username") Set strPassword = InputBox("Enter Password:", "Password", "Password") Disconnect Mapped Network Drive oNetwork.RemoveNetworkDrive strDrive WScript.Sleep 2000 'msgbox "Disconnecting Network Drive..." 'Connect Map Network Drive oNetwork.MapNetworkDrive strDrive, strPath, False, strUser, strPassword WScript.Sleep 2000 'msgbox "Connecting Network Drive..." [VBScript -- End] Thank you for your help, jfcby |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Map Network Drive with Remember Password I want the mapped drive to stay connected after I "Shut Down" my PC but so far un-successful. I think the problem is located in this part of the script: > oNetwork.MapNetworkDrive strDrive, strPath, False, strUser, strPassword. This is what I've already tried and it did not work: 1. I've tried changing False to True: > oNetwork.MapNetworkDrive strDrive, strPath, True, strUser, strPassword 2. I've tried leaving it blank: > oNetwork.MapNetworkDrive strDrive, strPath, , strUser, strPassword There is something I'm missing and I have not figured it out yet. I've searched this news group and Google but I keep finding the type of script posted below. What changes can be made to the following script so that after I shut down my pc and restart, the drive is still connected without having to login? Quote: > [VBScript -- Begin] > > On Error Resume Next > Dim oNetwork > > Set oNetwork = CreateObject("WScript.Network") > > strDrive = InputBox("Do NOT CHANGE Network Drive Letter:", "Network > Drive Letter", "Z:") > strPath = InputBox("DO NOT CHANGE Network Path:", "Network Path", "\ > \server\share") > Set strUser = InputBox("Enter User Name:", "User Name", "username") > Set strPassword = InputBox("Enter Password:", "Password", "Password") > > Disconnect Mapped Network Drive > oNetwork.RemoveNetworkDrive strDrive > WScript.Sleep 2000 > > 'msgbox "Disconnecting Network Drive..." > > 'Connect Map Network Drive > oNetwork.MapNetworkDrive strDrive, strPath, False, strUser, > strPassword > WScript.Sleep 2000 > > 'msgbox "Connecting Network Drive..." > > [VBScript -- End] jfcby |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| MAP network drive does not remember logon info | Vista networking & sharing | |||
| Network Drive Does not Remember Password (Vista) | Vista networking & sharing | |||
| Why Vista keep forgetting password shared network? remember checkedoff. | Vista General | |||
| Vista won't remember my mapped network drive password ? | Vista networking & sharing | |||
| Network Drive Does not Remember Password | Vista General | |||