Drive mapping (remove the "on servername\path)

  • Thread starter Thread starter dugout
  • Start date Start date
D

dugout

I have been searching for a way to remove the "on <servername\path>"
that shows up on mapped drives and printers that have been added from a
printer shared on another server.

Ie. folder on "servername\foldera'(z:)

I think that it might be able to be done in a GPO but I have nto found
it yet. Thanks
 
dugout said:
I have been searching for a way to remove the "on <servername\path>"
that shows up on mapped drives and printers that have been added from
a printer shared on another server.

Ie. folder on "servername\foldera'(z:)

I think that it might be able to be done in a GPO but I have nto
found it yet. Thanks
Hi,

The mapped drives description can be adjusted e.g. in a logon script:


'--------------------8<----------------------

Call AdjustDriveDescription()


Sub AdjustDriveDescription

Dim oShellApp, oWshNet, oDrives, i, sDrive, sDriveDesc
Dim aDriveDesc, sNewDriveDesc

On Error Resume Next

Set oShellApp = CreateObject("Shell.Application")
Set oWshNet = CreateObject("WScript.Network")
Set oDrives = oWshNet.EnumNetworkDrives

For i = 0 to oDrives.Count - 1 Step 2
sDrive = oDrives.Item(i) & "\"
sDriveDesc = oShellApp.NameSpace(sDrive).Self.Name
aDriveDesc = Split(sDriveDesc, " on '")

If UBound(aDriveDesc) > 0 Then
sNewDriveDesc = aDriveDesc(0)
oShellApp.NameSpace(sDrive).Self.Name = sNewDriveDesc
End If

Next
On Error Goto 0
End Sub

'--------------------8<----------------------
 
Back
Top