Printing to LPT1 using net use

T

The One

Hi All,

A friend of mine has an old DOS application which can only print to LPT1,
LPT2 or LPT3. He purchased a new PC which only has USB ports. He obtained
a lead which allows windows applications to print to his printer and
after some suggestions from this newsgroup we managed to get the DOS
application printing after sharing the printer as HP1 and using the
following:

net use lpt1: \\127.0.0.1\HP1

This appears to work but there are two problems.

1) You need to re-issue the net use command from a dos box every time
the PC is re-booted. If you type net use it says the LPT1 is unavailable.
I have tried putting a batch file in the start folder for all users but
it does not work. Running the batch program from a dos box works.

2) There is a considerable delay when printing

I do not know if these two issues are related.

Can anyone add any advice on overcomming these issues ?

TIA John
 
V

V Green

See response inline:
The One said:
Hi All,

A friend of mine has an old DOS application which can only print to LPT1,
LPT2 or LPT3. He purchased a new PC which only has USB ports. He obtained
a lead which allows windows applications to print to his printer and
after some suggestions from this newsgroup we managed to get the DOS
application printing after sharing the printer as HP1 and using the
following:

net use lpt1: \\127.0.0.1\HP1

This appears to work but there are two problems.

1) You need to re-issue the net use command from a dos box every time
the PC is re-booted. If you type net use it says the LPT1 is unavailable.
I have tried putting a batch file in the start folder for all users but
it does not work. Running the batch program from a dos box works.

Amend your net use command to the following:

net use lpt1: \\127.0.0.1\HP1 /persistent:yes

will make the connection permanent-downside is, if the OS can't
reconnect to the printer at logon, you'll get a bitch box to that effect.

2) There is a considerable delay when printing

this is a network issue, it is EXTREMELY hard to get delay-free
browsing, etc. these days, what with mixed OS/hardware environment
out there. My suggestion: live with it. The many workarounds
(HOSTS file, etc.) often lead to other problems.
 
D

Davide Guolo

John,
1) You need to re-issue the net use command from a dos box every time
the PC is re-booted.

Add /persistent:yes
2) There is a considerable delay when printing

There could be many reasons for this.
Probably the DOS app. is not closing the printer port at the end of the job,
so XP has to wait for the timeout value before spooling the job.
If this is true, closing the DOS app. will start the job immediately.

You could change the timeout value or (better) fix the DOS app. (if you
can).

If you also have a parallel printer connected to the captured LPT port,
maybe you could consider having Printfil redirecting the job for you.

Redards,
Davide
--------------------------------------------------------------
Printfil - Windows Printing System for Applications
http://www.guolo.com/printfil
Odbc4All - Connection to ODBC Data Sources for any Application
http://www.guolo.com/odbc4all
--------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top