How printing COM1 in DOS

Posted: 02-28-2005, 04:08 PM
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.


Reply With Quote

Responses to "How printing COM1 in DOS"

Davide Guolo
Guest
Posts: n/a
 
Re: How printing COM1 in DOS
Posted: 02-28-2005, 05:06 PM
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
--------------------------------------------------------------


Reply With Quote
Eduardo E. Zambrano Q.
Guest
Posts: n/a
 
Re: How printing COM1 in DOS
Posted: 03-01-2005, 02:54 PM
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
> --------------------------------------------------------------
>
>

Reply With Quote
Davide Guolo
Guest
Posts: n/a
 
Re: How printing COM1 in DOS
Posted: 03-01-2005, 11:01 PM
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
--------------------------------------------------------------



Reply With Quote
 
LinkBack Thread Tools Display Modes
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
USB Map to COM1 MJM Windows XP Device Drivers 0 08-12-2004 03:24 AM
GPS on COM1 cookdoggie Windows XP Hardware 1 12-09-2003 04:58 AM
com1 not available Rob Slye Jr Windows XP Hardware 1 11-22-2003 04:35 AM
COM1 port Poor Richard Windows XP Device Drivers 0 10-21-2003 01:40 PM