Net use command prompting for a username and password

We've got a dos based program that we use to print reports from.  The program prints to LPT1 and we've got an XP machine that we are using as a print server.  The same XP machine is also used by our shipping/receiving clerk.  She is a member of our domain and has to login in each morning with her username angela, password:*****.

When I use the net use command in dos to capture the printer port, it prompts me for a username and password.  Here, I have to enter username: angela and password:***** to be able to capture the printer port.

I'm using the /persistent:yes command which tells dos to keep this mapping even after rebooting which it does, but it's not keeping the username and password entries.

Is there another way to capture the printer port without having to enter a username and password or does anyone know how to write a batch file that I can run at startup to capture the printer port and enter the username and password automatically?

Thanks in advance for any help!!!
jeffmsasAsked:
Who is Participating?
 
chris_bolConnect With a Mentor Commented:
sorry, where I had put password you just need to put the password in.  
0
 
chris_bolCommented:
try this

net use whatever you use here /user:angela password
0
 
jeffmsasAuthor Commented:
Doing something wrong.  I'm getting a system error 1326 (login failure: unknown username or bad password.  Here's what I'm using:

net use lpt1: \\print_2\fujitsu /persistent:yes /user:angela password:angelaf

Is this correct?
0
 
jeffmsasAuthor Commented:
Sweet.  That worked!!!  Thanks a ton for the help!!!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.