Answered by:
Mapped drive will not disconnect

Question
-
I have a computer running Windows 7 Enterprise with a network drive mapped to another commuter running Windows XP Professional. The C drive in the computer with XP went bad and the computer was replaced. However I cannot disconnect the mapped drive.
If I try to disconnect it using the context menu option in Windows Explorer it brings up a dialog box that says, "This network connection does not exist," and does not disconnect it. I have also tried to disconnect it from the command line:
C:\>net use Z: /delete The network connection could not be found. More help is available by typing NET HELPMSG 2250. C:\>net helpmsg 2250 The network connection could not be found. C:\>
This problem is very annoying. Please help.
Tuesday, October 11, 2011 12:42 AM
Answers
-
In cmd windows, you can directly type command 'net use' to see the net connection.
If the Z: doesn't existed in the list, 'the network connection could not be found' is normal.
And you can directly define a new network location to Z:.
- Marked as answer by Juke Chou Wednesday, October 26, 2011 3:39 AM
Tuesday, October 11, 2011 7:45 AM -
once you replace you can delete the mapped drive now..
Regards, h9ck3r.- Marked as answer by Juke Chou Wednesday, October 26, 2011 3:39 AM
Tuesday, October 11, 2011 5:09 PM
All replies
-
In cmd windows, you can directly type command 'net use' to see the net connection.
If the Z: doesn't existed in the list, 'the network connection could not be found' is normal.
And you can directly define a new network location to Z:.
- Marked as answer by Juke Chou Wednesday, October 26, 2011 3:39 AM
Tuesday, October 11, 2011 7:45 AM -
It still showed up in the list but would not let me disconnect it. However, it replaced it just fine. Thank you.
- Proposed as answer by Kevin M. Covert Thursday, November 21, 2013 9:58 PM
Tuesday, October 11, 2011 2:14 PM -
once you replace you can delete the mapped drive now..
Regards, h9ck3r.- Marked as answer by Juke Chou Wednesday, October 26, 2011 3:39 AM
Tuesday, October 11, 2011 5:09 PM -
I was experiencing a similar problem on my computer. The root of the issue is that the drives where initially mapped when explorer.exe was started. As you said, after "disconnecting" them they still appeared in My Computer but not "net use". Restarting explorer.exe at this point removed the drives from My Computer.
- Proposed as answer by Skills Friday, July 6, 2012 9:44 PM
Friday, April 13, 2012 1:23 PM -
That's the ticket! KISS! (Keep It Simple Stupid) I remember this from my Novell instructor. I am definitely going to put this in my HOW TO's Thank you Robert Greer!
- Edited by Skills Friday, July 6, 2012 9:46 PM
- Proposed as answer by Change2009 Saturday, June 17, 2017 3:51 AM
Friday, July 6, 2012 9:44 PM -
This worked for me as well.
Thanks Robert!
Monday, July 23, 2012 8:07 PM -
I've tried both solutions, I've tried remapping the drive (net use Z: \\myServer\myShare\), restarting explorer and the computer. It still shows the disconnected drive and I can't delete it. Anybody else have this issue? Thanks.
Thursday, March 14, 2013 8:05 PM -
I have a similar issue on Server 2012, but when net use is run it shows "There are no entries in the list." but shows in Windows Explorer. Restarting Server and explorer.exe does not change anything?!Tuesday, April 9, 2013 6:50 AM
-
I have a client running Windows 7 connected to SBS 2011 Essentials. Mapped drives to previous server persist as icons in Windows Explorer and can't be deleted even though I used net use to delete the drive letter mappings. I have been able to map new letters to the shared folders on the new server but can't get rid of the red X icons no matter what I try, including the suggestion to net use the same drive letter and then try and disconnect.
Any suggestions would be appreciated!
Thanks.
Michael
- Proposed as answer by John C. Gallucci III Tuesday, April 14, 2015 7:33 PM
Friday, April 26, 2013 5:01 PM -
I tried all described above, but nothing worked. But somewhere I found that "Net Use /Persistent:yes" would set all current drives to persistent. I tried "Net Use /Persistent:no", booted and that one driveletter was gone at last. May be that will do the trick for you????
Leo Koolsbergen
- Proposed as answer by rbdsolutions Thursday, May 9, 2013 4:44 AM
Thursday, May 2, 2013 6:52 AM -
Microsoft: There are multiple bugs here, at least to the rest of the world. Please correct them anyway.
-> If 'net use' reports no drives, neither should Explorer.
-> A refresh in Explorer should remove the disconnected drives, if 'net use x: /delete' alone doesn't do it -- but it should.
-> The Explorer context menu 'Disconnect' should remove them also.
Monday, July 15, 2013 5:20 PM -
It seems by trial and error that the system has to be rebooted, logoff/on or Explorer killed in order to get the icon and drive from showing up on the computer list. This seems a bit illogical.
A small kill explorer batchfile will fix the issue without logoff/on or reboot like:
@echo off
net use * /delete /y
taskkill /f /IM explorer.exe
explorer.exeNote: substitute your own net use [x]: /delete command for specific mapped drive letters
- Proposed as answer by TonyVov Saturday, July 27, 2013 1:52 AM
Saturday, July 27, 2013 1:51 AM -
I have tried this but no luck - I still see Disconnected Network Drive (V:) in explorer. Also tried a restart and settings /persistent:No and Yes.
Is there any place I can escalate this to Microsoft and not be charged Pro Support fee for?
Sunday, July 28, 2013 10:32 PM -
the batchfile worked great.
thanks
Marcia Henry
Friday, September 6, 2013 2:14 AM -
Was having a similiar issue and this little batch file worked like a charm!
Thanks
- Proposed as answer by tommmyyyyyyyy Monday, November 23, 2015 3:53 PM
Friday, October 4, 2013 3:25 PM -
I have the same issue on Win 7. This drive is our home drive from AD.
The one factor I see is that all other drive mappings show as "Microsoft Windows Network" whereas this one mapping shows as NFS network. Perhaps this has something to do with it.
I can map the drive as letter Z and it works. It is mapped as drive P and will not allow me to access. System error 85.
Status Local Remote Network
-------------------------------------------------------------------------------
OK J: \\t70nas301\home\jpanik Microsoft Windows Network
OK N: \\T01FAP01\ISDATA Microsoft Windows Network
P: \\t70nas301\home\JPANIK NFS Network
OK Q: \\T70NAS301\PUBLIC\PUBLIC Microsoft Windows Network
OK R: \\T70NAS401\SHARED\SHARED Microsoft Windows Network
OK S: \\T70NAS301\SHARED Microsoft Windows Network
OK Z: \\t70nas301\home\jpanik Microsoft Windows Network
The command completed successfully.Thursday, October 31, 2013 7:03 PM -
ANSWER:
In HKEY_CURRENT_USER\Network the key for the drive does nto exist.
Exported one of the other keys for a drive mapping and edited the content to match that of my locked drive.
[HKEY_CURRENT_USER\Network\P]
"RemotePath"="\\\\t70nas301\\home\\jpanik"
"UserName"=dword:00000000
"ProviderName"="Microsoft Windows Network"
"ProviderType"=dword:00020000
"ConnectionType"=dword:00000001
"DeferFlags"=dword:00000004add this to a REG file and merge the data.
Once this is done, click the drive mapping and the error is that the drive is not available, you can now disconnect the mapping.- Proposed as answer by Jimm Panik Thursday, October 31, 2013 7:10 PM
Thursday, October 31, 2013 7:10 PM -
Just log-off or restart the system it will go off.Wednesday, November 6, 2013 1:17 PM
-
I have found that these "phantom" drive mappings can be removed by using a scheduled task:
for example open an elevated CMD prompt and type the following:
If you wish it to run at 13:00 (1:00 PM) and the drive letter to remove is "Z:"
AT 13:00 NET USE Z: /DELETE /Y
Open explorer and you will see the drive letter is now removed.
DOS Vader
- Proposed as answer by Whizzy42 Tuesday, October 28, 2014 5:29 PM
Friday, December 6, 2013 9:14 PM -
I have found that these "phantom" drive mappings can be removed by using a scheduled task:
for example open an elevated CMD prompt and type the following:
If you wish it to run at 13:00 (1:00 PM) and the drive letter to remove is "Z:"
AT 13:00 NET USE Z: /DELETE /Y
Open explorer and you will see the drive letter is now removed.
DOS Vader
- Proposed as answer by Peter Lind-Hansen Friday, June 20, 2014 8:49 AM
Monday, December 16, 2013 6:46 AM -
it works! thanks a lotMonday, February 3, 2014 11:55 AM
-
The easiest way to fix this problem is to edit the regedit , it so simple.
open regedit
Go to HKEY_CURRENT_USER/Network
Now remove the letter you want in this case X, and restart the computer. issue is fixed.
- Edited by diako-support Sunday, February 16, 2014 11:20 AM
Sunday, February 16, 2014 11:20 AM -
There appear to be a multitude of people with the same issue and a multitude of solutions offered by others. I tried just about all of them but to no avail, including all the registry changes, net use commands, rebooting, restarting Explorer etc etc. In the end, the only solution that allowed me to actually disconnect my network drive and remove it from displaying in explorer was the following: remove the offending PC from the network Domain (ie. join a workgroup), login as a local administrator, then you can disconnect the offending drives. Then re-register the PC to your Domain as per normal and you will find that the offending drives are gone and you can re-establish your required network mappings.Wednesday, March 5, 2014 6:21 AM
-
Thanks DOS Vader - yours was the only method that worked for me. Possibly because in my case the drive letter was mapped to a NAS share?
Tangata_Manu
Friday, March 28, 2014 6:28 PM -
Thanks! Worked.Monday, April 14, 2014 3:04 PM
-
@echo off
net use * /delete /y
taskkill /f /IM explorer.exe
explorer.exeWorking fine for me, keep mind to run it like administrator
Alejo
Tuesday, June 3, 2014 12:54 PM -
Brilliant, this helped me resolve the issue.Tuesday, June 17, 2014 1:45 PM
-
This is a serious bug in Windows Explorer, and I'm very much surprised that Microsoft failed to address it for so long:
All workarounds posted here or else where basically work by killing Explorer, or worse still by rebooting Windows. This is ridiculous :-(This bug has been in all versions of Windows since at least Windows XP. For example, here's a 2006 post that reports exactly the symptoms I'm having today with Windows 8: http://www.pcreview.co.uk/forums/getting-rid-disconnected-network-drives-explorer-t2414089.html
As in that 2006 example, I'm regularly affected by the consequence, where Windows Explorer reports the OLD share name (the one that refused to go away after the drive became disconnected) even after the same drive letter is mapped on a DIFFERENT share. This is really a serious issue, as this can potentially lead to data loss, by misleading the user to copy or erase data on the wrong shares!!!
Mr Microsoft, how can we officially enter this bug in your bug tracking databases, and make sure that Windows Explorer gets fixed at last?
(That means fixing the three symptoms of the problem reported by chiptech above, plus the fourth I report here.)
(And please no more suggestions for workarounds. It's a fix preventing the issue from reoccuring that we need, not yet another time consuming method for repairing Explorer after it starts displaying false information.)
Jean-François
Monday, July 7, 2014 10:30 AM -
I was going to give this one a try but there are no entries under HKEY_CURRENT_USER\Network (I even added another mapping to see if one would show up - nope).Tuesday, August 19, 2014 3:13 PM
-
Leaving and re-joining the domain was my "last resort" - it didn't work either.
Tuesday, August 19, 2014 3:15 PM -
This was the one for us : running a scheduled task. Importantly I believe that this was because the network drive was created by the system account and ultimately regardless of enhanced permissions it would not delete as any other user.
By simply running the scheduled task as that same system user I was able to remove the mapped drive through a scheduled task.
Thanks
Friday, August 29, 2014 5:54 PM -
s this just a bug in explorer, I wonder. This is why:
A user (win8.1) did not have, through an oversight, the rights to a certain share. So I made a mapping using different user-credentials, which at least provided the user with reading-rights. When the oversight had been corrected (the user now had read/write access to the share) I wanted to re-do the mapping. So i tried to delete it, but ran into the situation more-or-less as described here: in explorer, drive has red cross; in the registry, drive is not to be found; under 'net use', drive is not listed; in a cmd-window, drive does not exist. (By the way: if this is just an explorer issue, then how come the drive doesn't exist in a cmd-window?) Then I tried to just re-map the driveletter, this time using the user's own credentials, without first disconnecting. This SEEMED to work, but in fact, access was still read-only! Then - here it gets hairy - I tried mapping to that share using a different driveletter: the mapping was read-only! Suspecting that somehow first completely deleting the driveletter was essential, I tried most of the above tricks - to no avail.
What finally worked was, especially under my 20/20 hindsight vision, very simple: first re-mapping the offending driveletter to a different share, then to the right share again. Not only did the drive have write-access, but now I could delete the mapping in the normal way by just disconnecting in win explorer.Friday, October 17, 2014 5:02 PM -
DOS Vader's scheduled Task option
This was the only solution that worked for me...
Tuesday, October 28, 2014 5:28 PM -
I used: "net use Z: /delete" and it did remove the drive. I even check HCU/Network and it was gone.
History: Drive returned on its' own. Ran "net use" and it did not report anything. Ran "net use Z: /delete" and it said deleted. Ran "net use" and it did not report anything. Check HCU > Network and drive is gone. Restarted MyComputer and the drive is still there.
I did a search of the entire registry for the drive's network name and it isn't there. Sure wish MS would take a few minutes off of Win10 and fix this problem with Win8.
Thursday, November 13, 2014 11:18 AM -
Thanks Tony
I went to task manager>processes. Find Explorer.exe and end task. Next click applications tab, click NEW TASK type in Explorer.exe and click OK. you're done Drive was gone
- Edited by justnuts69 Tuesday, December 2, 2014 3:38 PM
Tuesday, December 2, 2014 3:25 PM -
The batchfile described above didn't work on itself, but i implented one important command to it
This will delete those "ghost"-netdrives. Create .cmd -file and paste text belowe to it, and run as an admin.
Net Use /Persistent:no
net use * /delete /y
taskkill /f /IM explorer.exe
explorer.exe- Proposed as answer by Kiran Manandhar Friday, August 5, 2016 4:30 AM
Tuesday, December 9, 2014 8:05 AM -
Proposed as answer by TonyVov Saturday, July 27, 2013 1:52 AM
taskkill /f /IM explorer.exe
net use * /delete /y
explorer.exeYou nailed it. That was driving me crazy. I tried everything else in this thread. ONLY this worked and I needed to do all of the steps.
THANKS TONS!!!- Edited by IT Architect Friday, January 2, 2015 2:10 PM
Friday, January 2, 2015 2:09 PM -
I support Henge's believe that the mapped drive was created by the SYSTEM account and can thus only be removed using the SYSTEM account.
Instead of DOS Vader's scheduled Task, I however used SysInternals PSExec to Run a command as SYSTEM.
psexec -s -i cmd
net use Z: /delete /y- Proposed as answer by Kapil Patry Thursday, September 10, 2015 4:27 AM
Thursday, March 5, 2015 4:19 PM -
Thanks Robert. Restarting explorer fixed the issue.Tuesday, March 10, 2015 2:22 PM
-
I have found that these "phantom" drive mappings can be removed by using a scheduled task:
for example open an elevated CMD prompt and type the following:
If you wish it to run at 13:00 (1:00 PM) and the drive letter to remove is "Z:"
AT 13:00 NET USE Z: /DELETE /Y
Open explorer and you will see the drive letter is now removed.
DOS Vader
Friday, September 4, 2015 2:51 PM -
@ Ten Cents, This worked for me perfectly on a Windows Server 2012 R2. Earlier, I had tried all the solutions that were posted here in this forum and out there on the web but running psexec as a System process and deleting the mapped drive was a no problem at all. Thanks!!Thursday, September 10, 2015 4:29 AM
-
To remove the incorrectly labeled mapped drive, follow these steps:
- Click Start, point to Run, type regedit, and then click OK.
- In Registry Editor, locate the following registry subkey:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2
- Right-click the mapped drive that you want to remove. For example, right-click ##<var class="sbody-var" style="box-sizing:border-box;">Server_Name</var>#<var class="sbody-var" style="box-sizing:border-box;">Share_Name</var>, and then click Delete.
- Restart PC :-)
- Proposed as answer by CAD_IT_Guy Friday, July 14, 2017 11:41 AM
Thursday, September 17, 2015 7:01 AM -
This registry edit was the only thing that worked for me. Thank you!!Saturday, October 31, 2015 7:27 PM
-
@ Ten Cents
thanks, run as SYSTEM is key to the issue for me.
Wednesday, December 2, 2015 11:51 AM -
I had 2 drives showing as disconnected with red crosses. I was unable to unmap in most of the ways suggested above. I was getting system error 85 or not found.
The worrying thing was that when opened they still linked to a server share (the wrong one) and the user had R/W access to the root of the server's data drive, even though they were not an admin! I couldn't find any cached credentials. I assumed some kind of rogue software had done this.
Using the task scheduler with SYSTEM rights, I managed to get rid of one of them.
The 2nd one could only be got rid of through deleting the MountPoints2 registry key as described here.
Thanks a lot.
- Edited by trichromic Friday, January 29, 2016 2:14 PM
Friday, January 29, 2016 2:13 PM -
I had this problem, all of the above did not work, turned out to be an application called CloudBerry Drive, it is used for Azure, Amazon etc. You need to unmount it from the app that created it, it is not managed by Windows 7,8, 8.1, 10 and so forth. IF not this, then something above should work. BTW, CloudBerry is a solid app, it was my mistake trying to manage it within Windows OS. There are many Network Drive app for local LAN's, Data Centre and Internet solutions, the question for yourself is; did I create it with Windows??, if YES and none of the above works, you probably have corruption, sorry to tell you that but some suggestions below. If NO, then go back to the app.
The other thing to consider is that the network location cannot be reached, windows appears to hang when you click it or very slow to start File Explorer due to your Quick Access setting having Recent places monitored, look at; firewall, share deleted, NIC problem, IP Address changed via DHCP (changed or cannot be reached), default IP Addr instead of correct IP address (starts 169.254...), permissions have changed on the share/network drive location, PC not joined to the correct domain or none at all, a workgroup for the share has been created and you are not part of it.
The Network Drive table is stored in; HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices use regedit if you are confident. In the Command Prompt (CMD) the net use command returns error 2 or 86 when you try to delete it if it is managed by another application outside of windows. If you created it with an app but have since uninstalled it then regedit is probably your only option: caution regedit can kill a machine, if you are not confident, take a backup before you start, if you fail and kill the machine then refresh windows is your only option if you didn't backup first.
- Edited by The Life of Riley Tuesday, May 31, 2016 2:36 PM
Tuesday, May 31, 2016 2:34 PM -
Thanks,
This worked without rebooting.
Monday, July 11, 2016 9:21 PM -
brilliant. years ago I had set the z: to exist across boots and without logins for a service to use. You jogged my memory and your commands solved me. thanks!
Jim S.
Friday, July 29, 2016 7:03 PM -
It seems by trial and error that the system has to be rebooted, logoff/on or Explorer killed in order to get the icon and drive from showing up on the computer list. This seems a bit illogical.
A small kill explorer batchfile will fix the issue without logoff/on or reboot like:
@echo off
net use * /delete /y
taskkill /f /IM explorer.exe
explorer.exeNote: substitute your own net use [x]: /delete command for specific mapped drive letters
Finally this fixed the problem. First I mapped the same drive with some other network folder. I then created the batch file net_Use_delete.bat with the following commands:
C:\Temp>notepad net_Use_delete.bat
net use G: /delete /y
taskkill /f /IM explorer.exe
explorer.exeC:\Temp>net_Use_delete.bat
C:\Temp>net use G: /delete /y
G: was deleted successfully.
C:\Temp>taskkill /f /IM explorer.exe
SUCCESS: The process "explorer.exe" with PID 3148 has been terminated.C:\Temp>explorer.exe
Finally the File explorer has deleted the G: drive information without rebooting the PC.
Friday, August 5, 2016 1:00 AM -
Hahar, hahaha!
Microsoft Logic Bomb:
"YOU CANNOT DELETE THIS NETWORK DRIVE BECAUSE THE NETWORK LOCATION NO LONGER EXISTS!"
Ta-dar!!
Perfect... absoutely....... perfect Microsoft. Thank you soooooo.... much. Your developers prove, on almost every level, why some people should NOT indeed ever think about becoming developers.
And unfortunately... they all appear to work for Microsoft. Maybe (after 30+ years of everyone else's misery) your H.R should really think about tightening their minimum IQ requirements.Saturday, August 27, 2016 7:08 PM -
It seems by trial and error that the system has to be rebooted, logoff/on or Explorer killed in order to get the icon and drive from showing up on the computer list. This seems a bit illogical.
A small kill explorer batchfile will fix the issue without logoff/on or reboot like:
@echo off
net use * /delete /y
taskkill /f /IM explorer.exe
explorer.exeNote: substitute your own net use [x]: /delete command for specific mapped drive letters
Tuesday, September 27, 2016 3:53 PM -
Thanks. It helped me to remove the drive from explorer.Tuesday, October 4, 2016 10:46 AM
-
Thanks Robert...It works.....hatsoffMonday, November 14, 2016 12:18 PM
-
This Woks for me...ThanksFriday, December 30, 2016 9:26 PM
-
I've tested all other solutions. And this one is only that worked for me.
- Download PSTools: https://technet.microsoft.com/en-us/sysinternals/pxexec
- Start Command Line
- Run command: psexec -s -i cmd
- Run command with your drive info: net use Z: /delete /y
Thanks for posting this!
- Edited by sakari.niittymaa Monday, January 16, 2017 10:08 PM
Monday, January 16, 2017 10:08 PM -
I support Henge's believe that the mapped drive was created by the SYSTEM account and can thus only be removed using the SYSTEM account.
Instead of DOS Vader's scheduled Task, I however used SysInternals PSExec to Run a command as SYSTEM.
psexec -s -i cmd
net use Z: /delete /yThanks Ten Cents, you are my savior. This issue drive me nuts for months. Only your solution works
Update: my deleted drive remap automatically after reboot. So check this registry key and delete suspicious keys
HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2
- Edited by DangH Monday, January 23, 2017 6:00 AM
- Proposed as answer by thefalcone Tuesday, July 11, 2017 8:28 PM
Sunday, January 22, 2017 8:10 AM -
It seems by trial and error that the system has to be rebooted, logoff/on or Explorer killed in order to get the icon and drive from showing up on the computer list. This seems a bit illogical.
A small kill explorer batchfile will fix the issue without logoff/on or reboot like:
@echo off
net use * /delete /y
taskkill /f /IM explorer.exe
explorer.exeNote: substitute your own net use [x]: /delete command for specific mapped drive letters
OMFG! Worked!
Another tool for my toolbox USB drive!
Monday, January 30, 2017 3:57 PM -
Old post I know but thank you for the simple reminder of the fix.Saturday, March 4, 2017 2:57 PM
-
This worked on Windows 10 machine and Task Manager makes it very easy to restart Windows Explorer now.Tuesday, March 21, 2017 10:54 AM
-
it works, thanks Tony.Wednesday, April 12, 2017 7:07 AM
-
Tested as of 05/29/2017 on Windows 10 Professional and is working.Monday, May 29, 2017 6:44 AM
-
Couldn't figure out how to post so putting this here in case it helps others. I went through and tried all solutions which didn't work for me.
When i went to HKEY_USERS > Network theer was nothing there so i just mapped another drive to \\127.0.0.1\c$ and then the registry populated. I then copied all values to what drive the system thinks is there. I rebooted and the problem drive is gone!!
Tuesday, May 30, 2017 6:16 PM -
Read and tried lots of these suggestions .... only this one worked for me.
Thanks!
Friday, July 14, 2017 11:42 AM -
This worked for me, Thanks alot.Thursday, August 24, 2017 4:36 PM
-
thanksTuesday, December 5, 2017 1:59 PM
-
Can confirm, solved the problem for me too!Monday, December 11, 2017 11:27 AM
-
No, this does not work in all cases. I can have a drive still showing in Explorer, with a red X by the drive icon, and the net use command shows no network connection to the drive. In trying to map the drive again, I get a "The network folder specified is currently mapped using a different user name and password. To connect, yada yada yada..."
And the Microsoft flunkie marked this as answered... typical. I still have not found a solution yet except for rebooting the computer with which I'm trying from to the network share, or logging off and logging back on to it.
Very annoying on several fronts...
- Edited by Sunriver61 Saturday, January 20, 2018 1:18 AM addi
Saturday, January 20, 2018 1:17 AM -
wrong.Saturday, January 20, 2018 1:19 AM
-
GREAT!!!
This has been a thorn in my side for too long to say.
Thanks for resolving, Mr. Greer!
Thursday, May 24, 2018 2:06 PM -
I use the following dos batch file and delay start it in task scheduler.
@echo off
rem Open a hidden explorer window to re-establish the connection.
FOR /F "tokens=1-2 delims= " %%i in ('net use ^| findstr ":" ^| findstr /i /v "^OK" ^| findstr "^[A-Z]"') do (
echo "%%i - %%j"
start "%%j:" /min explorer %%j
)
timeout 10
rem Close all the explorer windows with the string slholt-NAS- in them, if other servers
rem are used for the shares then they would need to be addes.
for /f "tokens=2 delims=," %%p in ('tasklist /fi "imagename eq explorer.exe" /v /fo:csv /nh
^| findstr /i /r /c:"slholt-NAS-"
') do taskkill /pid %%p
exitTuesday, June 19, 2018 3:43 AM -
I tried everything above this, and some other ideas from other websites. However, this worked exactly as described. I needed to download the PSTools from Microsoft.
Thank you Ten Cents
Thursday, July 19, 2018 3:36 PM -
I only had to restart Windows Explorer in Task Manager and the drives disappeared.Friday, September 14, 2018 5:07 PM
-
I have found that these "phantom" drive mappings can be removed by using a scheduled task:
for example open an elevated CMD prompt and type the following:
If you wish it to run at 13:00 (1:00 PM) and the drive letter to remove is "Z:"
AT 13:00 NET USE Z: /DELETE /Y
Open explorer and you will see the drive letter is now removed.
DOS Vader
Wednesday, November 28, 2018 4:14 PM -
Exporting the registry and merging it as a different drive letter worked for me. Worked like charm!Thursday, December 20, 2018 8:56 AM
-
I support Henge's believe that the mapped drive was created by the SYSTEM account and can thus only be removed using the SYSTEM account.
Instead of DOS Vader's scheduled Task, I however used SysInternals PSExec to Run a command as SYSTEM.
psexec -s -i cmd
net use Z: /delete /yWednesday, January 16, 2019 9:53 AM -
Confirmed working using this procedure:
As Jimm Panik said:
ANSWER:
In HKEY_CURRENT_USER\Network the key for the drive doesn't exist.
Exported one of the other keys for a drive mapping and edited the content to match that of the locked drive.
[HKEY_CURRENT_USER\Network\P]
"RemotePath"="\\\\t70nas301\\home\\jpanik"
"UserName"=dword:00000000
"ProviderName"="Microsoft Windows Network"
"ProviderType"=dword:00020000
"ConnectionType"=dword:00000001
"DeferFlags"=dword:00000004Note: In the above code, replace P with the drive letter that you want
In addition:
taskkill /F /IM explorer.exe
And the mapped disappear. Works like a charm
net use /persistent:NO
net use [drive letter] /DELETE
mountvol [drive letter] /D
explorer.exe- Edited by realpc2008 Wednesday, March 20, 2019 11:34 AM
Wednesday, March 20, 2019 11:30 AM -
Confirmed working using this procedure:
As Jimm Panik said:
ANSWER:
In HKEY_CURRENT_USER\Network the key for the drive doesn't exist.
Exported one of the other keys for a drive mapping and edited the content to match that of the locked drive.
[HKEY_CURRENT_USER\Network\P]
"RemotePath"="\\\\t70nas301\\home\\jpanik"
"UserName"=dword:00000000
"ProviderName"="Microsoft Windows Network"
"ProviderType"=dword:00020000
"ConnectionType"=dword:00000001
"DeferFlags"=dword:00000004Note: In the above code, replace P with the drive letter that you want
In addition:
taskkill /F /IM explorer.exe
net use /persistent:NO
net use [drive letter] /DELETE
mountvol [drive letter] /D
explorer.exeAnd the mapped disappear. Works like a charm
Wednesday, March 20, 2019 11:33 AM -
Even though this was posted on July 6, 2012, it works even now-2019!!!
Some things never change...
- Edited by Anonymous Tech User Thursday, March 28, 2019 10:39 PM
Thursday, March 28, 2019 10:38 PM -
Microsoft "remove bugs" from their scatophagic products? Heh, they'll just pile on a few more!Friday, November 15, 2019 7:18 AM
-
Hello Tony Vov,
I have been having the same problem for many months with the disconnected network drive appearing in explorer but not when using CMD. "Net Use"...This has been bugging me and have tried many posted solutions..
Just like to say thx for sharing as my now disconnected drive had gone using your batch file..
Problem solved..
Many Thanks
Sunday, January 12, 2020 11:29 AM -
Couldn't figure out how to post so putting this here in case it helps others. I went through and tried all solutions which didn't work for me.
When i went to HKEY_USERS > Network theer was nothing there so i just mapped another drive to \\127.0.0.1\c$ and then the registry populated. I then copied all values to what drive the system thinks is there. I rebooted and the problem drive is gone!!
I did exactly that - inside explorer, I mapped another drive letter (Z) to my \\network_drive\network_share. The HKEY_USERS > Network folder then populated with that Z drive. But instead of creating a new drive letter (W, which is the faulty one that wont disconnect) and then copying all of Z's data to it, I instead just right clicked Z -> renamed Z to W, crossed my fingers and hoped for the best. On first reboot, it logged into a black screen. I waited probably 30 seconds, then rebooted again, now it all works! There is a normal W drive mounted in explorer (no longer with the "x" (disconnected) next to it) and no Z drive. It worked!
I have to add, I earlier removed that drive path from HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2. Not sure if that step was necessary, but overall everything now works.
Wednesday, March 11, 2020 2:26 AM -
Thanks justnuts69. only your suggestion worked for me.Sunday, July 26, 2020 4:24 AM
-
This worked for me on Windows Server 2008 R2.
Thanks Sakari.
Monday, August 17, 2020 2:47 AM