Does anybody knows a "scriptway" to rename a mapped network drive?
Does someone knows maybe the originall C++ function, to do this, or a com
component?
Thanks in Advance
Hartmut ;-)
Am I the the [3.] generation genius or you?
"Hartmut Fiebiger" <H.Fie...@HartSoft.de> wrote in message
news:eJM3gHP2...@TK2MSFTNGP09.phx.gbl...
Hi,
The label I see is in the form
<ShareName> on '<ServerName>'
You can change the name, but then you also have to alter
any code that used the share (to map to it for instance).
I find no "label" attribute. There is a "description"
attribute, but that isn't what I see in Explorer.
To bind to the share:
Set objShare = GetObject
("WinNT://MyDomain/MyServer/lanmanserver/ShareName")
Wscript.Echo "Share name: " & objShare.Name
To rename it, I believe you would have to use the MoveHere
method. I haven't tested it, but the code could be:
Set objLanman = GetObject
("WinNT://MyDomain/MyServer/lanmanserver")
Set objShare = GetObject
("WinNT://MyDomain/MyServer/lanmanserver/ShareName")
Set objNewShare = objLanman.MoveHere
(objShare.AdsPath, "NewShareName")
However, I doubt this is what you want.
Richard