How printing COM1 in DOS

  • Thread starter Eduardo E. Zambrano Q.
  • Start date
E

Eduardo E. Zambrano Q.

Hi

I have a software in DOS runing on WinXp Pro SP 2 I need to print in COM1
Port.

I have this code in Bat file:

@ECHO OFF
CLS
MODE COM1:9600,N,8,1,p
SET PRINTER=COM1
MODE LPT2=COM1
PRG.EXE
CLS

The problem this while themselves this printing the reports these delay
approximately 2 minutes in beginning to be printed

Thaks
Eduardo Z.
 
D

Davide Guolo

Eduardo E. Zambrano Q.,
The problem this while themselves this printing the reports these delay
approximately 2 minutes in beginning to be printed

it could be related with the LPT timeout problem when printing from DOS on a
XP system.
Does the print job start immediately if you exit the DOS app.?

Kind regards,
Davide Guolo
--------------------------------------------------------------
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
--------------------------------------------------------------
 
E

Eduardo E. Zambrano Q.

Hi

It passes that and in ocaciones prints immediately and then carries out the
pause. in the two cases if the exit DOS app continuous the impression
 
D

Davide Guolo

Eduardo,
It passes that and in ocaciones prints immediately and then carries out the
pause. in the two cases if the exit DOS app continuous the impression

If exiting the DOS app. your print jobs starts immediately, then the app. is
not closing the printer port at the end of the job, so it's not spooled
until Windows reaches the timeout value (or the app is closed).

The best solutions could be to fix the DOS app., but if you cannot, then try
the following:

Go to SYSTEM.INI file
in [386enh] section search [Network]
if it does not exist enter the following :

[Network]
PrintBufTime=10
[IFSMGR]
PrintBufTime=10

This should set the timeout to 10 seconds.

There is also a solution I found on the net, changing the Windows Registry.
Please note that I HAVEN'T TESTED IT and take care using RegEdit: it could
be rather dangerous.

in REGEDIT ( START->RUN-> REGEDIT )
click : Hkey_local_machine
then click : System
then click : CurrentControlSet
then click : Control
somewhere at the bottom of the control list Click: WOW
Here you should find the LPT_timeout property

You may also want to have a look at Printfil, which can enable your DOS app.
printing to any Windows printer, including USB, GDI (Windows-only) and
Virtual (like Faxmodems and PDF writers/e-mailers) with many extras, like
print preview, font selection, BMP background merging and so on.
You can find more info and a free trial to download from our web site.

Regards,
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