Re: Change name of mapped drive

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: FrodoBaggins (email_at_address.com)
Date: 07/23/04


Date: Fri, 23 Jul 2004 10:43:58 -0700

Thanks Torgeir, that did what I wanted.

Jeff

"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
news:e$4VyoNcEHA.212@TK2MSFTNGP12.phx.gbl...
> FrodoBaggins wrote:
>
> > Hi all,
> >
> > I am mapping drives via vbscript during logon, using the mapnetworkdrive
> > method of WSH, and I would like to change the name of the mapped drive.
All
> > drives map successfully, but when a user goes into My Computer or
Explorer,
> > the see the mapped drives as follows:
> > sharename on 'servername' (J:)
> >
> > I would like to change it so that it only reads:
> > sharename (J:)
> >
> > I know that I can right click on the mapped drive and select rename, but
I
> > have not been able to find a way to do that via logon script. I have
yet to
> > identify what property represents "sharename on 'servername'". I took a
> > quick look at WMI, MappedLogicalDisk, and LogicalDisk, but did not find
what
> > I was looking for. Any thoughts?
> Hi
>
> A VBScript that works for both local and network drives:
>
> sDrive = "G:\" ' note the trailing backslash!
> Set oShell = CreateObject("Shell.Application")
> oShell.NameSpace(sDrive).Self.Name = "Some description here"
>
>
> --
> 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



Relevant Pages

  • Re: Mapped drives dont connect....
    ... wait for the network at computer startup and logon" to ... >> drives to a 2000 server. ... The user account won't reconnect the drives ... >Microsoft MVP Scripting and WMI, ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Newbie needing a little help
    ... Are you using VB Script to map the drives? ... The Windows Scripting Host documentation can be downloaded here: ... If you do not specify a value, it defaults to whatever you used the last ...
    (microsoft.public.scripting.vbscript)
  • RE: User Scripts
    ... users will not have their shared drives, ... Sounds like over all your having a scripting issue, ... each persons OU or create a gpo in every OU with users in it and edit the GPO ... Also one other fix is to reboot the machine 3 ...
    (microsoft.public.windows.server.active_directory)
  • Re: User Scripts
    ... users will not have their shared drives, ... Sounds like over all your having a scripting issue, ... I also use bat files for scripting and I use the same command you use. ...
    (microsoft.public.windows.server.active_directory)
  • Re: chosing drives connection
    ... >> Only via scripting the deletion of drives you don't want connected, ... >> Microsoft MVP - Terminal Server ... >>> i'am using HP T5000 thin client and PCs to connect TS session. ...
    (microsoft.public.win2000.termserv.clients)