- The network folder specified is currently mapped using a different user name and password error
- Symptoms
- Status
- Workaround 1
- Workaround 2
- Mapped drive connection to network share may be lost
- Symptoms
- Cause
- Resolution
- Method 1: Using Registry Editor
- Method 2: Using Command line
- Did this fix the problem
- More information
- 4 ways to delete mapped network drives in Windows 10
- 1. Use File Explorer to delete a mapped network drive from Windows 10
- 2. Run “net use /delete” in Command Prompt or PowerShell to delete a mapped network drive
- 3. Run “net use * /delete” in Command Prompt or PowerShell to delete all the mapped network drives
- 4. Use File Explorer to remove a network location mapping from your PC by erasing its shortcut
- Troubleshoot network drives and locations that won’t go away
- Did you manage to remove all the mapped network drives you wanted?
- Disconnecting / logging out from Windows network share without restarting Workstation service
The network folder specified is currently mapped using a different user name and password error
This article provides workarounds to solve the error messages that occur when you try to use different user credentials to connect to the other network share.
Original product version: В Windows Server 2012 R2, Windows Server 2008 R2 Service Pack 1, Windows 7 Service Pack 1
Original KB number: В 938120
Symptoms
Consider the following scenario:
- You have a Windows-based computer.
- There are two network shares on a remote server.
- You use user credentials to connect to one of the network shares. Then, you try to use different user credentials to connect to the other network share.
In this scenario, you receive this error message:
The network folder specified is currently mapped using a different user name and password. To connect using a different user name and password, first disconnect any existing mappings to this network share.
If you select OK in response to the error message, you receive the following error message:
Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again.
Status
This behavior is by design.
Workaround 1
Use the IP address of the remote server when you try to connect to the network share.
Workaround 2
Create a different Domain Name System (DNS) alias for the remote server, and then use this alias to connect to the network share.
After you use one of these methods, you can use different user credentials to connect to the network share. In this situation, the computer behaves as if it is connecting to a different server.
Mapped drive connection to network share may be lost
This article provides solutions to an issue where the mapped drive may be disconnected if you map a drive to a network share.
Original product version: В Windows 7 Service Pack 1, Windows Server 2012 R2
Original KB number: В 297684
Symptoms
On a computer that runs Windows 7 Service Pack 1, if you map a drive to a network share, the mapped drive may be disconnected after a regular interval of inactivity, and Windows Explorer may display a red X on the icon of the mapped drive. However, if you try to access or browse the mapped drive, it reconnects quickly.
Cause
This behavior occurs because the systems can drop idle connections after a specified time-out period (by default, 15 minutes) to prevent wasting server resources on unused sessions. The connection can be re-established quickly, if necessary.
Resolution
To resolve this behavior, change the default time-out period on the shared network computer. To do this, use one of the following methods.
Method 1: Using Registry Editor
If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.
Use Registry Editor to increase the default time-out period. To do this, follow these steps, and then quit Registry Editor:
You can’t use this method to turn off the autodisconnect feature of the Server service. You can only use this method to change the default time-out period for the autodisconnect feature.
Click Start, click Run, type regedit, and then click OK.
Locate and then click the following key in the registry:
In the right pane, click the autodisconnect value, and then on the Edit menu, click Modify. If the autodisconnect value doesn’t exist, follow these steps:
- On the Edit menu, point to New, and then click REG_DWORD.
- Type autodisconnect, and then press ENTER.
On the Edit menu, click Modify.
Click Hexadecimal.
In the Value data box, type ffffffff, and then click OK.
The client-side session is automatically disconnected when the idling time lasts more than the duration that is set in KeepConn. Therefore, the session is disconnected according to the shorter set duration value between AutoDisConnect and KeepConn. To change the time-out duration in the client-side during a UNC connection, specify the arbitrary time in KeepConn. Locate and then click the following key in the registry:
- Location: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanworkstation\parameters
- Value: KeepConn
- Data type: REG_DWORD
- Range: 1 to 65535 (sec)
- Default value: 600 sec = 10 mins
Method 2: Using Command line
If you use this method, you may turn off the autotuning feature for the Server service.
To change the default time-out period for the autodisconnect feature of the Server service, open a command prompt, type the following line, and then press ENTER:
where number is the number of minutes that you want the server to wait before it disconnects a mapped network drive. The maximum value for this command is 65,535.
If you set the autodisconnect value to 0 (zero), the autodisconnect feature is not turned off, and the Server service disconnects mapped network drives after only a few seconds of idle time.
To turn off the autodisconnect feature, open a command prompt, type the following line, and then press ENTER:
Did this fix the problem
Check whether the problem is fixed. If the problem is fixed, you are finished with this section. If the problem is not fixed, you can contact support.
More information
Some earlier programs may not save files or access data when the drive is disconnected. However, these programs function normally before the drive is disconnected.
For more information about how to increase the default time-out period, Server service configuration and tuning
4 ways to delete mapped network drives in Windows 10
Mapping network drives and other locations is a good way of keeping remote data at hand in your local area network. However, at some point, you might also want to delete some of these drive mappings and keep only those that you regularly use. In this article, we show you exactly how to do that. Here are four methods for deleting mapped drives and network locations from Windows 10:
NOTE: If you arrived here while searching for ways to create mapped network drives in Windows 10, and not ways to delete them, read: How to map FTP locations, network drives, and web shares, in Windows 10 and Windows 8.1. This guide was made for Windows 10, but the methods we show also work in older versions of Windows.
1. Use File Explorer to delete a mapped network drive from Windows 10
If you need to delete a previously created drive mapping, the first thing you must do is open File Explorer. Then, on the left side of the window, select This PC. All of the mapped drives are available in the Network Locations group, beneath your solid-state drive, hard-disk drives and other similar devices such as CD/DVD units or USB memory sticks.
To delete a drive mapping toward a network location, right-click (or press-and-hold) on it and select Disconnect.
To remove a drive mapping towards a network folder or FTP site, right-click (or press-and-hold) on it and select Delete.
The deleted mapped drives then stop showing. If you want to restore them, you have to recreate them.
2. Run “net use /delete” in Command Prompt or PowerShell to delete a mapped network drive
If you prefer command-line environments, you can use the net use command to delete mapped network drives from Command Prompt or PowerShell. Open the one you like best and run this command: net use [Mapped Drive Letter] /delete. Then, press Enter. For example, we have a drive mapping to which we assigned the letter Z, so we have to type: net use Z: /delete.
You are informed that the mapped drive was deleted successfully, and the network drive disappears immediately from File Explorer.
NOTE: The net use /delete command only works for drive mappings that have a letter assigned. It doesn’t work for network location mappings such as FTP servers or web servers.
3. Run “net use * /delete” in Command Prompt or PowerShell to delete all the mapped network drives
If you have more than one mapped network drive configured and you want to delete them all at once, you can use the same net use command to disconnect them all at once. Open Powershell or start Command Prompt and run the following command: net use * /delete.
PowerShell or Command Prompt then shows you all the active network connections that are going to be canceled. It might also ask whether you are sure that you want to continue. Type in Y if you do, or N if you don’t.
TIP: If you want to use the net use command to delete all the mapped network drives and you want to force the process to go on without asking for any confirmations, add the /y parameter to the command: net use * /delete /y.
4. Use File Explorer to remove a network location mapping from your PC by erasing its shortcut
A network location mapping is a shortcut stored as a file on your Windows computer. If you can’t delete it using the first method we’ve shown, you can try others. One of them is to use File Explorer to delete its shortcut. Open File Explorer and navigate to “C:\Users\Your_User_Name\AppData\Roaming\Microsoft\Windows\Network Shortcuts”. Your_User_Name is the name of your Windows 10 user account. In the Network Shortcuts folder, you can find all network location mappings. Select the ones you no longer want to use. Then, right-click (or press-and-hold) on them and select Delete or press the Delete key on your keyboard.
The selected network mappings are deleted immediately, without additional confirmation.
Troubleshoot network drives and locations that won’t go away
There are times when none of the methods we described above work as they should. When such a situation occurs, there are a few things you should try:
- If you disconnect a mapped network drive or delete a network location, but it doesn’t disappear from File Explorer, the reason might be that the File Explorer didn’t get to refresh its contents. Try pressing the F5 key on your keyboard or click/tap on Refresh in the right-click menu inside File Explorer.
- If you tried to remove a network mapping from your Windows 10 PC, but you get an error about that location as no longer being available, your Windows operating system is likely outdated. We’ve tested to see what happens when the PC with the mapped network drives and locations is disconnected from the network or when the network resources are no longer available (target devices are shut down or are no longer part of the network), and all the methods illustrated in this article worked correctly.
- Sometimes, even though you disconnected or deleted a network drive or location from your Windows PC, the operating system gets hung up and can’t remove these links on the fly. A good idea in such a situation would be for you to restart Windows 10. You can also restart the explorer.exe process by using Powershell or Command Prompt to run these two commands: taskkill /f /IM explorer.exe and explorer.exe.
Did you manage to remove all the mapped network drives you wanted?
As you can see from this article, there are quite a few alternatives to deleting drive mappings. The instructions above work on any Windows 10 computer or device. Did you manage to delete every mapped network drive or location you wanted? If you have something to add to our guide, don’t hesitate to use the comments below.
Disconnecting / logging out from Windows network share without restarting Workstation service
I have a file server running (SMB) that I connected to in Explorer (Windows 7 Professional) by visiting \\1.2.3.4 directly. I logged in as one user, without saving credentials, and now wish to log out (actually I want to change to a different user, but being able to log out in general would be useful).
I have searched around for ways to do this and found a bunch of info that suggests using some form of net use \\1.2.3.4 /del :
However, none of these actually seemed to work for me. I run net use * /del , then use net use to verify that the list is empty, and yet the share mysteriously remains in explorer, unaffected, accessible, and still using the previous login.
Another thing I tried, which also failed, was doing e.g. net use \\1.2.3.4 /user:newusername to switch the credentials. However, even when net use showed an empty connection list, this still produced an error stating that multiple connections to the same resource with different users were not allowed — why there were connections that didn’t show up in net use ‘s list is a mystery to me.
I then found this article How to logout from shared folder (microsoft.com), which recommends:
- net use * /del (or whatever server).
- Clear credentials from Credential Manager.
- Restart the Workstation service.
This procedure worked for me. There was nothing of interest in the Credential Manager, as I did not save credentials, however restarting the Workstation service after clearing the connections with net was the key (I did have to close all explorer windows to get the service to restart).
My question is: This is not very convenient at all, especially when I have to explain it to less tech-savvy users. While I could certainly create e.g. a batch script to automate the whole thing, is there an actual, proper, consistent way to do this that doesn’t involve restarting services (and possibly doesn’t involve the command line, although personally I don’t mind)?
Also, a sub-question: It is weird to me that the vast majority of resources I found on this matter didn’t suggest restarting Workstation, and the suggested process of using net use alone seemed to work at least for the other people who posted comments on those posts. Is the Workstation restart unique to me and indicative of some other issue on my machine, or was it just left out of all the instructions for some reason? Only the microsoft.com support post had instructions that recommended this step, which is what finally got it working for me.
Logging out of a share seems like it would be a common enough use case to justify some simple way to do it, so I am baffled by how difficult it was for me to figure this out.