• Notice regarding image hosts and attachments. See here.

Remove server names in mapped drives

Soldato
Joined
10 Jan 2006
Posts
9,447
Location
Bournemouth tbh
Does anyone know how on my domain I can remove the server name from the mapped drives?

i.e "testfolder$ on 'Server"

How can I make it so it just reads "testfolder$"

Edit: Without rightclicking - rename :P As I have to roll this out throughout the company

Cheers
 
Last edited:
If I remember rightly, I think you can do it in vbscript.

Edit: I found the script that I was thinking of.

Code:
' NameDrive.vbs
' VBScript to map a network drive.
' Authors Guy Thomas and Barry Maybury
' Version 1.4 - April 2005
' ----------------------------------------' 
' 
Option Explicit
Dim objNetwork, strDrive, objShell, objUNC
Dim strRemotePath, strDriveLetter, strNewName
' 
strDriveLetter = "W:" 
strRemotePath = "\\server\directory" 
strNewName = "Drive Name"

' Section to map the network drive
Set objNetwork = CreateObject("WScript.Network") 
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath 

' Section which actually (re)names the Mapped Drive
Set objShell = CreateObject("Shell.Application")
objShell.NameSpace(strDriveLetter).Self.Name = strNewName

WScript.Quit

' End of Example VBScript.
 
Last edited:
If you are deploying the mapped drive via Group Policy then this option should be present:

This changes the drive names from "Domain Share on \\ServerName" to "Domain Share".



Uploaded with ImageShack.us
 
Back
Top Bottom