[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1003
  • Last Modified:

Rename Mapped Drive via VBScript

Hi,

I have put together a basic vbscript file to map shared drives on a server to users desktops.

It uses:-
Set objNetwork = CreateObject("WScript.Network")
objNetwork.MapNetworkDrive "H:" , "\\server\home"
to map various drives successfully.

Is there a way I can add to this script in order to rename the drives so that they show on the end users PC as something more 'user friendly'?

Also...is there a way I can place shortcuts for these drives on the users desktops via this script?

I am using Windows Server 2003 with a mix of XP & 7 desktops.

Thanks.
0
craigaddison
Asked:
craigaddison
  • 2
  • 2
1 Solution
 
Mark DamenERP System ManagerCommented:
http://blogs.technet.com/b/askds/archive/2009/01/07/using-group-policy-preferences-to-map-drives-based-on-group-membership.aspx

Have a read of that.  Talks through the new Group Policy Drive Map Preferences - you may need at least 1 2008 domain controller for this though.  But, it does satisfy your requirement to "name" the drives.
0
 
craigaddisonAuthor Commented:
Hi,

Thanks for the link, but I am not running 2008, just 2003.
0
 
Mark DamenERP System ManagerCommented:
Read further down, just read that you don't need 2008. Just at least 1 vista or 7 client to configure the group policy with.
0
 
oBdACommented:
Try this:
Set objNetwork = CreateObject("WScript.Network")
Set objShell = CreateObject("Shell.Application")
objNetwork.MapNetworkDrive "H:" , "\\server\home"
objShell.NameSpace("H:").Self.Name = "Home drive"

Open in new window

0
 
craigaddisonAuthor Commented:
Brilliant thanks.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now