Re: Change name of mapped drive
From: FrodoBaggins (email_at_address.com)
Date: 07/23/04
- Next message: Michael Siekkinen: "How to copy accounts from one domain to another"
- Previous message: Matt Holmes: "Checking for the existence of an object method or property?"
- In reply to: Torgeir Bakken \(MVP\): "Re: Change name of mapped drive"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: Michael Siekkinen: "How to copy accounts from one domain to another"
- Previous message: Matt Holmes: "Checking for the existence of an object method or property?"
- In reply to: Torgeir Bakken \(MVP\): "Re: Change name of mapped drive"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|