Link to home
Start Free TrialLog in
Avatar of manthanein
manthanein

asked on

windows login script

hello all,

     I would like to ask for a sample window script that shall add a network drive while passing the  username and password, to connect to another computer.  
   
regards,
michelle
ASKER CERTIFIED SOLUTION
Avatar of Bartender_1
Bartender_1
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
To pass the information to the net use command, try this:

Net use p: \\<computername>\<sharename> "password" /user:<domain>\<username>

This should work in XP, but once again, the password is stored in the batch file and is readily available to be viewed by all.

:o)

Bartender_1
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of manthanein
manthanein

ASKER

Bartender_1, to answer your question it's because it's just a generic account, and everybody knows the password and the account to be used to map the network drive. I was only trying to prevent  mistyping of the password that would later on make the account to be used locked out. the source computer is included in our domain where I can't set any account  to be unlockable, so the only solution is to create a bat file to connect to the said directory and passing the username and passsword as argument..  
thanks