NET USE LPT1: \\User\Printer /PERSISTENT:YES gives me an access denied

clippersolutions

Distinguished
Jun 21, 2011
3
0
18,510
This works in other computers:

NET USE LPT1: \\RAP-PC\F300 /PERSISTENT:YES

When I type it from the CMD prompt
system responds with "The command completed successfully"
but something like ECHO TESTING>LPT1: responds with "Access is denied"
I have no problem printing with programs like Notepad, Word, etc.
I use lots of Clipper programs that send the output to LPT1.



 

clippersolutions

Distinguished
Jun 21, 2011
3
0
18,510


I am administrator in both computers. When I execute the command I open the CMD window where I type the NET USE command as Administrator.
 

clippersolutions

Distinguished
Jun 21, 2011
3
0
18,510
Yes, it was a permission issue. I had to create an user with a password in the computer with the printer attached
so I could NET USE LPT1: \\computer\printer /PERSISTENT:YES /USER:userid thePassword .

The new user does not have to be logged it. Existence is enough.

 

hugogabriel

Honorable
May 20, 2012
1
0
10,510


Hi clippersolutions, I work with clipper too, last month I found the same problem installing my program for 6 brand new computers sharing 2 brand new LX300, everything under Win 7 ultimate 64 bits, when the problem show up, I´d spend a lot of time trying to fix it... the only thing that I´d never try was your solution, I did not try it yet, I hope it will work. Maybe we can keep in contact to help ourselves with clipper. Actually I´m using xharbour with xedit, and I have 20 years of experience with clipper.
 

jomaoles

Honorable
Aug 25, 2012
1
0
10,510
I had the "Access Denied" problem with a Minolta Bizhub 200 network printer, although I had no problems printing from windows programs, I couldn't do it from a Clipper program that uses LPT1, even that there were no problems with some old printers redirecting LPT1 with NET USE.

I realize that the Bizhub 200 was by default configured in Properties/Advanced with the option "Print directly to the printer" instead of "Spool print documents..." I just change that and voilà.

 

dchester

Distinguished
Aug 27, 2011
3
0
18,510


Create a batch file for this and run it by right-clicking and selecting "Run as administrator"