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!

Net Use LPT1

Status
Not open for further replies.

BCC1Tech

Programmer
Mar 30, 2006
40
US
Hello. I have two Windows XP Pro machines and 1 shared printer. Both computers have the same user accounts with administrative permissions.

I am able to do the Net Use command on the computer with the printer attached, so the DOS printing works there.

I am able to map through Windows the shared printer to the second computer (not attached), but when I attempt to use the Net Use LPT1 command - I get access is denied.

I have to do the Net Use command for their DOS software, but for some reason, access is denied.

Any suggestions?

Thanks,
Melinda
 
Could it be because the printer is not LPT1 on that machine, its \\machinename\sharename, so net use \\machinename\sharename (where machinename is computer printer is connected to (use "" round the whole lot if spaces in either machine or sharename).
 
Check if lpt1 is in use type
net use LPT1
if you get system error 67 then its available, if it's in use you will need to run.
net use LPT1: /d
Make sure the share name is not longer than 8 characters.
 
By the way something I forgot to ask is it a USB printer or Parallel LPT cable.
 
Also you may have problems reassigning lpt1 if there is a physical lpt1 in the machine. To get around it either disable the printer port in the bios or make it lpt2 or net use it as lpt2.

Jock
 
Thank you for your posts. I was able to connect the printer by changing the spooling service, however, I am still having a weird issue.

When I do: dir>lpt1 - I get access is denied. When I change the printer settings under the advanced tab on the main computer to spool, I am able to print from the shared printer.

When I change the main computer to allow spooling instead of print directly to this printer, the main computer cannot print through DOS.

Any ideas?
 
Try either changing the spool to RAW or Text, see if it helps
 
It was set to RAW, so I changed it to TEXT. It still isn't working. This is too weird -

Computer that it is connected to will print only when set to print directly, but then the shared printing doesn't work.

If set to spool, then sharing works, but main computer can't print.

Any other ideas??? Thank you!
 
1 - try instead mapping lpt2 to the share,

NET USE LPT2: \\server\printer
DIR > LPT2:

... if that works, then the issue is that it's trying to print to the physical port instead of the redirected port.

Additionally, have you had success doing this before? The NET USE LPTx command will only work with DOS programs *if* the DOS program is using "proper" BIOS calls to print. If it is taking direct access of the printer port hardware, then it will not work. The NET USE LPTx command works by intercepting the DOS calls to the print subsystem and redirecting them to the spooler.

Another "cheating" workaround that you can try is:

1) Install a printer and tell Windows that it is plugged directly into the LPT1 port. (you don't have to plug a printer into LPT1)
2) Install a second printer that is mapped to the network printer.
3) Pool the LPT1 printer over to the network printer.

... your program will try to print to LPT1, and when Windows says "Oh, the printer isn't ready on LPT1", it will instead pool it over to the network printer.

Sometimes. (LOL)

Can't hurt to try though.



Just my 2¢
-Cole's Law: Shredded cabbage

--Greg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top