Sign in with
Sign up | Sign in
Your question

Printing to LPT1 using net use

Last response: in Windows XP
Share
Anonymous
July 4, 2004 5:40:29 AM

Archived from groups: microsoft.public.windowsxp.print_fax,microsoft.public.windowsxp.general (More info?)

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

More about : printing lpt1 net

Anonymous
July 4, 2004 12:02:45 PM

Archived from groups: microsoft.public.windowsxp.print_fax,microsoft.public.windowsxp.general (More info?)

See Bruce Sanderson's article at:
http://members.shaw.ca/bsanders/printfromdos.htm
--
Cari (MS-MVP Windows Client - Printing, Imaging & Hardware)
www.coribright.com

"The One" <TheOne@nowhere.com> wrote in message
news:Xns951C63C5D9397TheOnenowhere@207.46.248.16...
> 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
Anonymous
July 4, 2004 1:25:29 PM

Archived from groups: microsoft.public.windowsxp.print_fax,microsoft.public.windowsxp.general (More info?)

See response inline:
"The One" <TheOne@nowhere.com> wrote in message
news:Xns951C63C5D9397TheOnenowhere@207.46.248.16...
> 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.

>
> I do not know if these two issues are related.
>
> Can anyone add any advice on overcomming these issues ?
>
> TIA John
Anonymous
July 5, 2004 4:31:10 PM

Archived from groups: microsoft.public.windowsxp.print_fax,microsoft.public.windowsxp.general (More info?)

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
--------------------------------------------------------------
!