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

Redirect LPT2 to LPT1 for dos app printing

Status
Not open for further replies.

UltraSmooth

Programmer
Oct 28, 2002
97
CA
We have a dos application that is hard-programmed to print certain functions to LPT2. I need to be able to redirect these print jobs to the local LPT1 port. I've tried sharing out the printer on LPT1 and then capturing/mapping it to lpt2 but I get an error saying "Operation cannot be perfomed on your own computer, it can only be performed on a server".

Any ideas on how I get this setup?

Thanks in advance.
 
Yes, I tried to use a similar setup with NET USE, but got the same result as you did. The NET USE trick works in W2K but I guess you want to stick with W98.

Here are a couple of things which may work for you:-

1. Some BIOS's allow you to reprogramme the parallel port to LPT2, usually using I/O addr. 278 with IRQ 5 for instance.

2. There is an old DOS utility out there called PRNSWAP.COM which I think will do the business for you in W98. I understand this programme switches the I/O addresses of LPT1 and LPT2. I loaded it in AUTOEXEC.BAT and deliberately programmed a DOS application to print only to LPT2. Printer connected to the only parallel port on the machine, i.e. LPT1. Hey Presto! it printed! Since this small programme "flip-flops" between LPT1 and LPT2, what you could try is writing a batch file to start your DOS application, and insert PRNSWAP.COM just prior to the application line. I think if you use a "CALL" type DOS statement in the batchfile, you can put PRNSWAP.COM on the final line of your batchfile, and then it'll swap back LPT2 to LPT1 when you exit.

Hope that helps.

ROGER - G0AOZ.
 
Been a long time, but mode? mode lpt2:=lpt1:. Can't remember ever using it to switch between LPTs.

Ed Fair
Give the wrong symptoms, get the wrong solutions.
 
Ed, I think one has to have a physical LPT2 present before this will work. Good try! That of course would be the final solution - just bung in a parallel port PCI card...

ROGER - G0AOZ.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top