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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logon script, how to write password for mapping a network drive?

Status
Not open for further replies.

LastWords

IS-IT--Management
Joined
Oct 15, 2001
Messages
93
Location
GB
I am in the process of creating a simple but useful logon script (batch file), to map network drives, etc. However, one of the network drives needs a password before it can be mapped. When the script executes when the user is logging on, the script stops and asks for the appropriate password. How can I add this password to the logon script? So that the script doesnt stop halfway through.

Thanks. by Lastwords,

Maentwrog (n.Welsh): Celtic word for a computer spelling mistake.
 
Try piping the password in using the echo command, like this.

echo password|net use z: \\server\share Kevin Mattson
MCP
 
I tried that, it didn't seem to work. Back to the drawing board.. by Lastwords,

Maentwrog (n.Welsh): Celtic word for a computer spelling mistake.
 
Oh yeah, net use has a password parameter. Type net use /? at a command prompt to see the correct syntax. Kevin Mattson
MCP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top