Renaming a mapped drive

Anything VBScript-related, including Windows Script Host, WMI, ADSI, and more.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 11 years and 4 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
Clive.Hillier
Posts: 6
Last visit: Sat Sep 17, 2022 8:18 am

Renaming a mapped drive

Post by Clive.Hillier »

I am currently revising our logon script to include mapped drives to SharePoint 2010 document libraries & due to how the drives are named I wish to change them to something more obvious to the end user.

I have tried the following but it fails to work when I run the script:

mDrive = "drive letter"
Set oShell = CreateObject("Shell.Application")
oShell.NameSpace(mDrive).Self.Name = "AnyName"

If I check the registry key

HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerMountPoints2%key%

it is showing on one of the machines but others fail to display this key. If I add the key & the _LabelFromReg data it still does not change the name.

Does anyone have any ideas on a way that this can be achieved to rename the mapped drive?

Clive.
This topic is 11 years and 4 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked