[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Set user friendly name on mapped drives - VBS

Posted on 2011-05-11
2
Medium Priority
?
437 Views
Last Modified: 2012-05-11
Hey

I have a logon script mapping drives to the users.

How do I in VBScript set a user friendly name on the share?

For example user on (\\server\share) (H:) to Home (H:)...

Thanks in advance

Mike

0
Comment
Question by:mikeydk
2 Comments
 
LVL 25

Assisted Solution

by:Luis Pérez
Luis Pérez earned 1000 total points
ID: 35736744
Mmmm... try this: once the drive has been mapped, use this API function:

Private Declare Function SetVolumeLabel Lib "kernel32" Alias _
"SetVolumeLabelA" (ByVal lpRootPathName As String, _
ByVal lpVolumeName As String) As Long

You can use it this way:
Call SetVolumeLabel("H:","Home")

Hope that helps.
0
 
LVL 65

Accepted Solution

by:
RobSampson earned 1000 total points
ID: 35744246
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an addendum to the following article: Acitve Directory based Outlook Signature (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_24950055.html) The script is fine, and works in normal client-server domains…
In this article we want to have a look at the directory attributes which are used by Microsoft to store the so called Security Identifiers (SID). These SIDs plays an important role in delegating and granting permissions and in authentication of trus…
Loops Section Overview
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month18 days, 17 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question