Discussion Locked

batch file to map drive

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

i need to have batch file that quickly maps some network drives.. the reason it's a batch is because i dont need these drives mapped everytime i log into my computer.. so i looked it up..but still need some help:

net use s:\\ABC\d$ /user:hello

i am trying to map the S drive to the computer named: ABC under the username: hello
but it askes me everytime for the password, how would i add in the password in the script so that i won't be prompted for it

1 reply

by joseph moore

Say the password for the user account HELLO is: Passw0rd

And say the HELLO account is in the MYDOMAIN Windows domain

The proper syntax for your BAT file would be:

NET USE S: \\ABC\D$ /U:MYDOMAIN\HELLO Passw0rd

hope this helps

This discussion is closed to new replies.