Sign in with
Sign up | Sign in
Your question

How printing COM1 in DOS

Tags:
  • DOS
  • Microsoft
  • Software
  • Windows XP
Last response: in Windows XP
Share
Anonymous
February 28, 2005 1:08:08 PM

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

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.

More about : printing com1 dos

Anonymous
February 28, 2005 8:06:41 PM

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

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
--------------------------------------------------------------
Anonymous
March 1, 2005 11:54:48 AM

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

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


"Davide Guolo" <guolo.NOSPAM.davide@libero.it> escribió en el mensaje
news:BcIUd.55398$lB4.1506100@twister1.libero.it...
> 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
> --------------------------------------------------------------
>
>
Anonymous
March 2, 2005 2:01:38 AM

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

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