Computer Performance, Windows 2003, Exchange 2003, Logon Scripts

Code Error 80070055 - The local device name is already in use

Troubleshooting Code Error 80070055 - The local device is already in use

Introduction to error Code 80070055

Error code 80070055 occurs when you try to map a network drive with a VBScript.  My suggestion is that you have already mapped a drive with this particular letter.Code Error 8005055 - The device is already in use

The Symptoms you get 80070055

When you execute the VBScript you get a WSH (Windows Script Host) message box like this diagram opposite.  The script does not execute as you had hoped.

The Cause of Error 80070055

One possibility is that you trying to map a network drive but the drive letter you wish to use has already been assigned.   Perhaps you have already run the script once, and now you double click the .vbs file one more time.  Alternatively, you have forgotten that the H:\ or K:\ drive letter is a physical drive on this particular machine.

Another cause could be your VBScript contains an illegal LDAP reference, probably a typing mistake, maybe an extra letter.  Check the spelling of your objects in the script.

Another clue is the Source: WSHNetwork.MapNetworkDrive. A clear indication that the MapNetworkDrive method is causing the error.

For 'The local device name is already in use', check your drive letters and printers, in particular lookout for potential duplicates.

The Solutions for The local device is already in use

To examine the drive letters, open windows explorer and check the local drive letters against the DriveLetter used in your script.  In this example it is the K: drive which is causing the problem.

Another cause could be a syntax error.  Check or adjust the slashes in your path. 

For example:  RemotePath = "\\ alan\home"     is correct.
For example:  RemotePath = "\\ alan\home\"    has an extra \ at the end and is incorrect.

Under different circumstance is could be a duplicate printer.  So check the printer folder to see what printers have already been installed.

Check this section for examples of MapNetworkDrive

Guy Recommends: SolarWinds Engineer's Toolset v10Engineer's Toolset v10

The Engineer's Toolset v10 provides a comprehensive console of utilities for troubleshooting computer problems.  Guy says it helps me monitor what's occurring on the network, and the tools teaches me more about how the system literally operates.

There are so many good gadgets, it's like having free rein of a sweetshop. Thankfully the utilities are displayed logically: monitoring, discovery, diagnostic, and Cisco tools.  Download your copy of the Engineer's Toolset v 10

Example Script for Error 80070055

GuyNet.MapNetworkDrive DriveLetter, RemotePath

The DriveLetter corresponds to K: and the problem was that the drive letter was already mapped.

 

'Purpose of the script is to Connect or Disconnect the K drive
'If connected it disconnects

Set WshShell = WScript.CreateObject("WScript.Shell")
Set GuyNet = WScript.CreateObject("WScript.Network")
Set CheckDrive = GuyNet.EnumNetworkDrives()

DriveLetter = "K:" 'DriveLetter must be a CAPITAL letter
RemotePath = "\\alan\home"

AlreadyConnected = False
'GuyNet.RemoveNetworkDrive DriveLetter
For i = 0 To CheckDrive.Count - 1 Step 2
If CheckDrive.Item(i) = DriveLetter Then AlreadyConnected = True
Next

If AlreadyConnected = True then
GuyNet.RemoveNetworkDrive DriveLetter
GuyNet.MapNetworkDrive DriveLetter, RemotePath
WshShell.PopUp "Drive " & DriveLetter & "Disconnected, then connected successfully."

Else
GuyNet.MapNetworkDrive DriveLetter, RemotePath
WshShell.PopUp "Drive " & DriveLetter & " connected successfully."

End if

Solarwinds IpMonitorTry a different solution, download SolarWinds ipMonitor

Here is my thinking, ipMonitor will give you valuable data about your network and servers.  This extra information just may unlock the solution to your error code.  One more thing, sometimes when troubleshooting you go around in circles; therefore if you try a different, but related approach, you may just crack the problem.  Free Download of SolarWinds ipMonitor (21 day eval).

Computer Training Software - Recommended Training VideosGuy Thomas recommends Computer Training Software

Their topics and material are ideal for getting you started with VBScript.  The videos are easy to follow and you can control the pace.  Try their free demo material and then see if you want to buy the full package. See more about VB Script Training CD.


Do you need extra help?

For interpreting the WSH messages check Diagnose 800 errors.

For general advice try my 7 Troubleshooting techniques

Give something back?

Would you like to help others?  If you have a good example of this error, then please email me, I will publish it with a credit to you:

 


Download my Logon Script eBook for only $6.25

Logon ScriptThe extra features you get in your eBook include, more pages full of detailed examples.  Also, ten 'how to...' sections, with screen shots showing which menus to use.  Go for Guy's eBook - and get a printable version with copy enabled and no expiry date.

  Jumbo Script 7 Package

 *


Google

Web  This website

Review of Orion NPMGuy Recommends: Orion's Network Performance Monitor (NPM)

Orion NPM is designed for detecting network outages.

Network-centric views (screenshot) make it easy to see what's working, and what needs your attention.

Download your free trial of Orion's network performance monitor

 

Home Copyright © 1999-2009 Computer Performance LTD All rights reserved

Please report a broken link, or an error.