We use a vbscript that modifies the users registry with the name of the drive. In the example below the mapped drive is mapped and shows as 'Student Resources'. We also use a DFS namespace. Hope that helps.
Code:
Option Explicit
On Error Resume Next
Dim objFSO,objFILE,objShell,objNetwork
set objFSO=CreateObject("Scripting.FileSystemObject")
set objShell=CreateObject("Wscript.Shell")
set objNetwork=CreateObject("Wscript.Network")
Dim strHelpMsg, iErrorTimeout, blnShowError
strHelpMsg="Contact QES IT Support Help Desk for further assistance."
iErrorTimeout=10
blnShowError=True
'setup friendly names for mapped drives
objShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\##queenelizabeth#data#StudentResources\_LabelFromReg", "Student Resources", "REG_SZ"
'Map network drives
MapIt "R:", "\\queenelizabeth\data\StudentResources"
Sub MapIt(strDrive,strMap)
Const FORCE_REMOVE = True
Const UPDATE_PROFILE = True
Const NOT_PERSISTENT = False
Dim strMsg
On Error Resume Next
If objFSO.DriveExists(strDrive) Then
objNetwork.RemoveNetworkDrive strDrive, FORCE_REMOVE, UPDATE_PROFILE
End If
objNetwork.MapNetworkDrive strDrive, strMap, NOT_PERSISTENT
If Err.Number <> 0 And blnShowError Then
strMsg="There was a problem mapping drive " & UCase(strDrive) & " to " &_
strMap & VbCrLf & strHelpMsg & VbCrLf & "Error#:" & hex(err.Number) &_
VbCrLf & Err.Description
objShell.Popup strMsg,iErrorTimeOut,"Error",vbOKOnly+vbExclamation
End If
End Sub