The following script will attempt to find a specified mapped drive in a users account and replace it with a new drive path.  

This script must be run with the desired user account logged in with administrative privileges.  

Option Explicit

'On Error Resume Next

Dim strMappedDrives, strCurMappedDrivePath, objWshShell, strOldMappedDrivePath
Dim strMappedDriveKey, strNewMappedDrivePath, strDriveLetter

Set objWshShell = WScript.CreateObject("Wscript.Shell")

'---Set Variables
strDriveLetter = "T"
strOldMappedDrivePath = "\\server\OldSharePath2"
strNewMappedDrivePath = "\\server\NewSharePath"

'---Export Old Mapped Drive entry
strMappedDriveKey = "HKCU\Network\" & strDriveLetter & "\RemotePath"
Wscript.Echo "Path: " & strMappedDriveKey
strCurMappedDrivePath = objWshShell.RegRead(strMappedDriveKey)
'WScript.Echo "Current Mapped Drive Path: " & strCurMappedDrivePath
'WScript.Echo "Looking for Path: " & strOldMappedDrivePath

If strCurMappedDrivePath = strOldMappedDrivePath Then
	'---Overwrite with New Mapped Drive entry
	strMappedDrives = objWshShell.RegWrite(strMappedDriveKey, strNewMappedDrivePath, "REG_SZ")
	WScript.Echo "Set Path to: " & strNewMappedDrivePath & VbCrLf & VbCrLf & "Response: " & strMappedDrives
End If

WScript.Echo "Complete"