“Multiple Connections to a server or shared resource by the same user, using more than one user name, are not allowed” with MDT 2010

After upgrading to MDT 2010 from MDT 2008 Update 1, I noticed a common theme at some of my remote offices. The UserDataLocation variable specifies the location of where data is to be stored during the migration process of the deployment. This variable is processed with the ZTIGather.wsf script tha queries the deployment rules and the MDT DB. Even though the technician might not restore user data – they’re going to get errors like what you see below:

Example: UserDataLocation=\\servername\usmt4\migdata\

So during the deployment wizard it would auto-complete the above location. Then all the tech would have to do is type %computername%.  In this scenario if the tech chooses not to restore user data, he gets the error seen in this screen shot:

I discussed this with one of the Lead MDT Developers in October and have posted the details of the error and the fix below.

The error encountered in the ZTIUserState.log and BDD.log, “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..”

A change has been made in MDT 2010 to deal with mappings to lower-level directories, which has caused some issues when the lowest level part of the path doesn’t exist. MDT attempts to map it, but that fails because the folder doesn’t exist, and is not able to create the folder because were not mapped. While this doesn’t cause the deployment to fail, it leaves you with some nasty errors in the logs and you might see this in the Summary Screen:

To fix the problem the ZTIUtility.vbs file needs to be edited in the scripts folder. Open the file and replace the following code in the MapNetworkDriveEX function:

Case Else

‘ Case &h800704C3 ‘ Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed.

‘ Case &h8007052E ‘ Logon failure: unknown user name or bad password.

‘ There was a some kind of fatal error.

If ErrDesc <> “” then

MapNetworkDriveEx = ErrDesc

Else

MapNetworkDriveEx = “Unable to map UNC Path ” & sShare & ” :” & “( 0x” & hex(HasError) & ” ) ”

End if

oLogging.CreateEntry MapNetworkDriveEx & “”, iLogType

Exit function

End select

With this code:

Case Else

Err.Clear

On Error Resume Next

oNetwork.MapNetworkDrive  chr(sDrive)&”:”, sShare, False

HasError = err.number

ErrDesc = err.Description

On Error Goto 0

If Err.Number <> 0 Then

‘ There was a some kind of fatal error.

If ErrDesc <> “” then

MapNetworkDriveEx = ErrDesc

Else

MapNetworkDriveEx = “Unable to map UNC Path ” & sShare & ” :” & “( 0x” & hex(HasError) & ” ) ”

End if

oLogging.CreateEntry MapNetworkDriveEx & “”, iLogType

Exit function

Else

Exit Function

End If

End select

Leave a comment