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

scripting 'Net Use LPt1' prompts password but \\servername does not

Status
Not open for further replies.

dellboy

IS-IT--Management
May 11, 2001
277
GB
I am trying to map local printers through LPT1 and 2, this is for a dos based system that can only print this way, I don't yet know enough about the said system.

I am trying to map the printers using

net use lpt1: \\servername\printersharename

when this is run through a batch file there is a prompt for a username and password. If however I simply click

Start
Run
\\servername\printersharename

the printer will install. Is this because the net use command is running at a DOS level which is sub domain authentication and therefore you have to input a username and password? I'm not sure whats happening. If I log onto a desktop as the domain admin and run the DOS command

net use lpt1 \\servername\printersharename

the command completes so I am thinking it is either a security and rights issues or DOS being sub domain authentication - if that makes any sense.

If anyone has any suggestions I would be greatful, its probably something simple but just not that simple when you don't know ;)

Cheers
 
From what I found it is trying to make sure you have access to the LPT1. The password it wants is access to LPT1 not your share. I ran into the exact same thing myself. What you need to test out is: does this happen if you try it with LPT2?

Windows XP does not block LPT1, it blocks all LOCAL printer ports, so if lpt1 is no longer there, you can map it as a user.

So what I have done is used a utility called devcon.

I then removed lpt1 which allowed me to add it as a non-local admin.

*Thanks to jthiessen and bcastner in thread779-904984 for this one*
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top