Discussion Locked

Mapped drives to same server

0 helpful
8 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

One of our developers ran a program on a server that mapped about 15 drives to one of the servers local drives. These mappings cannot be disconnected nor can they be deleted with net use /delete. In fact they do not show up as mapped under net use, although they show up in My Computer and can be used to access the drive. When we logged out and back in, we got the messages saying "cannot reconnect, drive already in use.." And the drives were still there.
Any clues as to how I can get rid of these?

8 replies

by ntoz

If you right click on My computer, and select disconnect network drives, does this allow you to disconnect the sessions?

Pete

by shanghai sam

Disconnect network drives was not available for these. The only way we got rid of them was to reboot.

Thanks

by lee v.

First try to have that developer log in and disconnect the mapped drives. If the developer is no longer available, then you will need to log on as an administrator, and find and load the User Hive for the developer in the REGEDT32 Registry Editor.You have to use this one because REGEDIT will not allow you to load other hives. (Be VERY careful whenever you have to edit the registry directly! One bad keystroke or mouse-click can mean disaster.)

Assuming this is NT 4.0 server, select Run from the Start menu and type REGEDT32, and when it opens minimize all your windows except the HKEY_LOCAL_MACHINE window. Then choose Load Hive from the Registry Menu. Navigate to your NT Profiles directory to find the profile for the developer, for example, C:\WINNT\Profiles\DeveloperUserName, and choose Ntuser.dat and click on the Open button. When Asked for a Key name type something like HKEY_Developer_User and hit enter. The new Key will appear in your active window. Double-click on the key to expand it, and you'll see a Network Key. Double-click on that key, and you should see a list of all the mapped drives for that user. You can then click on them one at a time and hit the delete key, and choose Yes when asked if you want to delete the key. You can then unload the hive, and then exit REGEDT32.

Log off and log in as you normally were, and hopefully all those mapped drives will be gone.

Good luck, and again, be very careful. I hope this helps.

by lee v.

Another quick thought. You didn't say if you get an Access Denied message when you try to disconnect them, but if the developer's program created services which use the shares, then that could be giving you a sharing violation that will not allow their disconnection.

by shanghai sam

It was really strange, but no matter who logged in the mapped drives were there until we rebooted. The only drives in the registry were the ones that were real remote network drives, not the ones mapped back to the same machine.

When I tried to disconnect them with "net use" the message was that the connection could not be found. Right clicking in the drive did not even show the Disconnect option.

Thanks for you lengthy answer though. You get some points.

by antsmac

I think the problem is that the 'System' Acoount has the drives mapped rather than a particular user. To disconnect them you could use a scheduled job because the schedule service runs as the 'System'. the command would be something like this:

At 16:31 "\Winnt\System32\Net.exe Use X: /delete"

Hope this helps

Ants

by shanghai sam

You may be on the right track, but I don't know since I ended up rebooting and that got rid of the mappings. He did use an API call to do it. I know that under my login on that server I can map to a local share on the same machine and then disconnect it just fine. It was strange becaue "net use" command by itself showed only a list of drives that were already mapped to remote shares, not the ones that the developer mapped to the local machine. But they were in My Computer and could be used.

You get the points for being the closest.

Thanks

This discussion is closed to new replies.