Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Setup Maps off of two different Usernames  (Read 2172 times)

0 Members and 1 Guest are viewing this topic.

Chrisxs5

    Topic Starter


    Hopeful
  • Sup!?
  • Thanked: 8
    • Where we learn IT daily!
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 8
Setup Maps off of two different Usernames
« on: September 26, 2007, 03:31:44 PM »
I need to setup a batch that will map my the network drives for me based on 2 seperate domain passwords. One Domain uses different username and passwords per user the other the same username and password regardless. I alos need to disconnect all drives before continuing. So here is what I have so far.

Code: [Select]
@ ECHO OFF

:START

'PTC Maps
net use F: \\PTC1SVR204\dallas /user:%username% /persistent:yes
net use G: \\PTC1SVR206\colorado /user:%username% /persistent:yes
net use H: \\PTC1SVR204\noc /user:%username% /persistent:yes

'JSA Maps (L is a must for system application)
net use K: \\server\g\scans /user:ABC /persistent:yes
net use L: \\server\c /user:ABC /persistent:yes
net use M: \\server\e /user:ABC /persistent:yes

'IVS Maps
net use S: \\PTC1SVR204\productionbatches /user:%username% /persistent:yes
net use T: \\PTC1SVR204\archivedbatches /user:%username% /persistent:yes
net use U: \\PTC1SVR205\ivsscans\scans /user:%username% /persistent:yes
net use V: \\PTC1SVR205\ivsscans\splitdocs /user:%username% /persistent:yes



:END
Side Note: I have only ever used batch files before to copy files or start software (you know, one liners) so take it easy on me.
Check out my blog: http://vitrookie.com

System, Network, Virtualization, Storage, ETC Admin with a bunch of certs and an ego trip!

Chrisxs5

    Topic Starter


    Hopeful
  • Sup!?
  • Thanked: 8
    • Where we learn IT daily!
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 8
Re: Setup Maps off of two different Usernames
« Reply #1 on: September 27, 2007, 10:06:45 AM »
Well let me ask this:

How can I set the password from within the script?
Check out my blog: http://vitrookie.com

System, Network, Virtualization, Storage, ETC Admin with a bunch of certs and an ego trip!