Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script to map a drive and add a route addition

Status
Not open for further replies.

Puffinstuff

IS-IT--Management
Oct 8, 2009
1
US
I've never been a scripter, but have been tasked with creating a startup script that will automate the mapping of a network drive as well as create a route.

The notes my predecessor left behind simply say:

Command to use:

net use w: \\192.168.100.100\mitsubishi\ "" /user:ppc


I've got no experience with this sort of thing. It's too close to programming for me (I'm a network engineer). Might anyone be able to steer me in the right direction as to how to write this script up?
 
You could simply run that statement in a batch file. This should be the VBS equivalent if you need to add something into a VB login script:
Code:
Set WSHNetwork = CreateObject("WScript.Network")
WSHNetwork.MapNetworkDrive "W:", "\\192.168.100.100\mitsubishi", False, "ppl", ""

Unless I'm missing something, that statement is not creating a route. It just maps a drive to a shared folder and references the server by address instead of name.

Jeff
[small][purple]It's never too early to begin preparing for [/purple]International Talk Like a Pirate Day
"The software I buy sucks, The software I write sucks. It's time to give up and have a beer..." - Me[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top