failure to save user info for mounted network drive

Forums Operating Systems Windows Server 2008 R2 Miscellaneous failure to save user info for mounted network drive

Viewing 5 reply threads
  • Author
    Posts
    • #44180

      This is something that’s been pissing me off for ages, but i just can’t get windows to save the user info for the mounted network drive. So every time i restrt PC i need to enter user info for it, which honestly defeats the purpose. Since it works for my brother in Win7, i was wondering if there’s a setting that disables windows to save username/passwords or something?

    • #51474

      My suggestion to you would be to create a logon script in Group Policy that contains the mapped network drive in a batch file.

      In notepad enter:

      net use Z: \ServerShare /user:USERNAME password; where

      Server is name of the remote computer you are targeting
      Share is the name of the share/folder you wish to map
      USERNAME is the name of the user ON THE target machine (not yours)
      password is the name of the password on the target machine (not yours)

      You also don’t have to use Z: as your network drive letter i just provided that as an example. I just choose a high letter so if you add a removable device or slave another drive the drive assignment doesnt go out of whack automatically.

      So for example if I wanted to share a folder called “Docs” on Bob-PC and the username was Bob and password was 12345 i would do the following:

      net use Z: \BOB-PCDocs /user:bob 12345

      If the username contains no password you must type in “” to indicate a blank password.

      net use Z: \BOB-PCDocs /user:bob “”

      Configure the line above using your specs and save the file as “mappedrive.bat” or something like that. Save the file in c:windowssystem32

      In group policy,

      Click on start, run… Type in: gpedit.msc

      User Configuration > Windows Settings > Scripts (logon/logoff) > Logon

      Click Add…

      In Script Name:

      c:windowssystem32mappedrive.bat

      Click OK twice to save changes.

      Now go to User Configuration > Administrative Templates > System > Scripts > Run logon scripts synchronously

      This prevents your logon script from running after Windows Explorer has initated. This way when you logon and you see your desktop (aka your start button) your drive will already be mapped.

      Hope this solves your problem!

    • #51476

      Thanks for the info. The script works (tried running it manually), however, once i restart i get the baloon popup that says that it could not connect all network drives.

      If i then go to Computer, and doubleclick on the drive it says this (something that it didn’t do before):

      An error occured while connecting Z: to
      \ServerPCD
      Microsoft Windows Network: Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disonnect all previous connections to the server or shared resource and try again. The connection has not been restored.

      I also tried removing the “Run logon scripts synchronously” rule, effect is the same. The unusual thing is that if i then go and run the script manually, it works and the drive is then available again.

    • #51475
      Arris
      Moderator

      Maybe you should add the following line in the script before the net use Z: command:

      net use \Server /delete

      This command closes all current connections to the specified server.

    • #51477

      I see the problem. When you restart the computer a new session is created and thus you get the “multiple connections to this blah blah is not allowed” message.

      I would suggest creating a logoff batch file script using the same method in my earlier post except you create a logoff script instead of a logon script. In the logoff script put this:

      net use * /delete /yes

      This will delete all mapped drives on logoff and a new session should be created upon the next reboot. Tell me if this solution works. Thanks Arris for your tip as well.

    • #51478

      Yes, this worked. Thanks.

Viewing 5 reply threads
  • You must be logged in to reply to this topic.