How to fix Windows 7 error “The local device name is already in use.”

So I get this error every once in a while which causes my mapped network drives to no longer work and sometimes prevents me from accessing the network machine those drives are located on completely (even via ipaddress) even though I can still ping them.

So the solution is to open command prompt under administrator so:

Start -> search "cmd" ->right click on it -> click "Run as Administrator"

Then type inside command prompt,

<code>net use * /delete</code>

Once you do this you can either restart the machine and go to the “Map Network Drive” via the GUI or type

<code>net use Z: \\server\share /user:username password</code>

Into command prompt with the proper network drive letter, network location, and username and password.

Now… This happens to me frequently enough that instead of bothering with remembering how to fix it, I wrote a quick .bat script to do the work for me.

To do this open notepad (start -> search “notepad”) and copy this into it:

::Fix network problem
net use * /delete
net use F: \\Network\share\ /user:Username Password
net use G: \\Network\share\ /user:Username Password
net use H: \\Network\share\ /user:Username Password
shutdown /f /r /t 600 /c "The Computer will now shutdown, please close all applications."

and save it as “FixNetworkDrives.bat”

When ran this will delete all mapped network drives, then remount them and then restart the machine 1 minute later.

Thanks to dekyos for his solution.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s