RISLA
asked on
Map drive via bat file
Hoping to get some assistance using a bat file to map (or re-connect) a network drive.
I need the bat file to include a username and password.
The current bat file doesn't work:
net use H: \\SERVER\D$ PASSWORD /user:adminstrator
I need the bat file to include a username and password.
The current bat file doesn't work:
net use H: \\SERVER\D$ PASSWORD /user:adminstrator
ASKER
Problem is that it keep becoming disconnected. This bat file is used to reconnect the drive.
add /persistent:yes to the end
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
THANKS!
Just so I can learn, how does the accepted solution resolve the problem. It doesn't include a drive letter, and for the version of NET.EXE I have it shows the password coming before the /user: parm, not after?
~bp
~bp
and you said it works but kept disconnectng, after first saying not working?!
A bit confused here myself too and would like to learn more...
How does the accepted solution work when it doesn't include a drive letter, and how does it address the original problem of disconnection?
How does the accepted solution work when it doesn't include a drive letter, and how does it address the original problem of disconnection?
What error do you get?
Steve