• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 148
  • Last Modified:

How to add multiple network drives?

0
MontyV
Asked:
MontyV
  • 4
  • 3
1 Solution
 
JesterTooCommented:
Thank you for the extra question, but it wasn't really necessary.  The answer is in the last script I posted...

find these (marked) lines in the previous script

     -- change the next two lines for a different set of drive mappings...
     aDrives  = array("Z:", "Y:")
     aPaths   = array("\\mainserver\Divita Hotels Documents", "\\mainserver\DivitaHotels Documents")

and change it like this (to add two more drives/paths)...

    aDrives  = array("Z:", "Y:", "G:", "H:")
    aPaths   = array("\\mainserver\Divita Hotels Documents", "\\mainserver\DivitaHotels Documents", _
                            "\\anotherserver\sharename", "\\yetanotherserver\sharename")

As I mentioned earlier, this script could pretty easily be changed to read the drive mappings from a text file then you would have all kinds of flexibility without editing the script again.  You could even use the text file to specify a "common" section that applies to all users and individual sections that are "user specific".  The script would have a bit more code, but not a whole lot.

Thanks for the grade!
Lynn
0
 
nffvrxqgrcfqvvcCommented:
You can also use a DOS command called subst to create a directory associated with a specific folder or location.

SUBST
0
 
MontyVAuthor Commented:
Works good.  Is there a way to set this up without the message box popping up.  I realized it may have worked well if it was one drive but now I have about four drives popping up.  What do I remove if I don't want any message box to pop up only just to map the drives without the user having to click ok every single time.

-Monty
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

 
JesterTooCommented:
You could either remove (comment) the "Wscript.Echo" statements, or execute the script like this:

   cscript /nologo mapdrives.vbs

If you merely type in "mapdrives.vbs" the system will, by default, execute it using "wscript" which executes the "Wscript.Echo" statements in a modal-windows manner just like Wscript.Popup.

-- Lynn
0
 
MontyVAuthor Commented:
Thank you for the quick responses Lynn.
0
 
JesterTooCommented:
You're welcome, Monty... thanks again for the grade.

Lynn
0
 
MontyVAuthor Commented:
Lynn how proficient are you with VBA Excel?  You seem pretty verse and I would love some help with this question if you have time.

http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_21405073.html

- Monty
0
 
JesterTooCommented:
Sorry, Monty... I know next to nothing about using VBA as a macro language inside other apps.

-- Lynn
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

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