hi
how can i change label of a mapped network drive by commands (for example in
a batch file or logon script)

Re: labelling a mapped network drive by joseomjr

joseomjr
Fri Jun 15 23:44:01 CDT 2007

Dim objShell : Set objShell = CreateObject("Shell.Application")
Dim objDrive : Set objDrive = objShell.NameSpace("Z:\")
objDrive.Self.Name = "SharedDrive"


RE: labelling a mapped network drive by RemS

RemS
Sat Jun 16 16:44:01 CDT 2007

"mahmoodi" wrote:

> hi
> how can i change label of a mapped network drive by commands (for example in
> a batch file or logon script)
>

NET USE does not have a way to customize the name of the mapped drive.

One common way to perform this task by command lines is to hack the
following Registry key and add the _LabelFromReg string value:

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\%key%Here, the %key% variable is the drive letter to be changed.

There is a whole host of ways to make this method work with a batch. You can
importing a .reg file using regedit /c.

http://www.e-articles.info/e/a/title/How-to-Rename-Mapped-Drives/

\RemS