Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 145
  • 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
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!

 
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

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!

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