Drive mapping (remove the "on servernamepath)

G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.general (More info?)

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
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.general (More info?)

dugout wrote:

> 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<----------------------


--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.general (More info?)

That was perfect Thanks. any chance that can be done for the printer
names a well?
 

TRENDING THREADS