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

Batch File

Status
Not open for further replies.

Publishing

Technical User
Oct 17, 2002
32
GB
Is there a batch file i can write to automatically log on to one our network drives?
 
You can create a bat file containing a NET command. For syntax, enter NET /? in command mode.
 
Command line for a batch file would be something like this:

net use q: \\servername\share /user:yourname *

where q: is the drive, servername is the server, share is the share name, yourname is the username, and * prompts for a password. If you don't want to prompt for a password the just type it in after the username like:

net use q: \\servername\share /user:yourname passwordhere -----------------------------------------------------
"It's true, its damn true!"
-----------------------------------------------------
 
HI,

You can try this out if you are using Domain.

net use z: \\server\share /user:domain\username password |*

or if the user already had the rights then just use

net use z: \\server\share

That's all. Aslam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top