Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DOS redirect LPT1 to file

788 views
Skip to first unread message

Thore

unread,
Oct 7, 2008, 9:55:39 AM10/7/08
to
Hi...
I have an old dos program running... still :)
The program for invoicing/inventory (I/I) and so...
Some 10+ years ago I had a small TSR-like program, that redirected
lpt1-output from the dos-program. Instead of print it was directed to a
file.
It worked fine on a dos 6.22 PC.

Now I have the I/I program installed on at XP-box (in a dos-window), and
the TSR don't seem to work. ...:(

Is there a freeware TSR that can work on the "new" setup?

--
Venlig hilsen / Best regards
Thore Sorensen - DK-2620 Albertslund
(Erstat evt .invalid med .dk for direkte mail)

Se min hobbyside: www.RacePhoto.dk

Sparky

unread,
Oct 7, 2008, 10:54:18 AM10/7/08
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Thore wrote:

> Hi...
> I have an old dos program running... still :)
> The program for invoicing/inventory (I/I) and so...
> Some 10+ years ago I had a small TSR-like program, that redirected
> lpt1-output from the dos-program. Instead of print it was directed to a
> file.
> It worked fine on a dos 6.22 PC.
>
> Now I have the I/I program installed on at XP-box (in a dos-window), and
> the TSR don't seem to work. ...:(
>
> Is there a freeware TSR that can work on the "new" setup?
>

Just out of curiosity, how are you loading the TSR? Inside the "DOS
box" or outside? Try starting your DOS shell with a batch file that
loads the TSR the same way it did/does in autoexec or whatever, or just
call it from the command line with the appropriate magic. If you're not
already doing it that way of course.

Note that XP won't allow non-administrators redirect LPT1, so you'll
have to become admin to do this (dangerous), or disable LPT1 in device
manager so that it becomes a "virtual" port rather than a physical one.
I do believe that will allow you to manage redirection as a user.

-----BEGIN PGP SIGNATURE-----

iEYEAREDAAYFAkjreAgACgkQUZCI41IC43gv7QCfQiiP5dDnoV+QFx6b6YdQAFSu
S2cAoJvB3E3+GLQhcR5LJh8YfvxbGzVw
=CiXK
-----END PGP SIGNATURE-----

Bob S.

unread,
Oct 7, 2008, 1:52:16 PM10/7/08
to

"Thore" <din...@mail.invalid> wrote in message
news:vopme458s6jl880t8...@4ax.com...

Thore,

Running a DOS window under XP is not "real" DOS. For instance, open a
DOS window, type VER and you see "Microsoft Windows XP [Version
5.1.2600].

Then type HELP and you'll get a list of the commands that can be run.
Different set of commands than 6.22 DOS.

It's been a long while since I've written any batch files using DOS so
I can't offer up a quick fix for you without doing some research.

I just did a search on Google using " redirect lpt1 to file " and got
93,000 hits - you may want to give that a read.

Bob S.


B. R. 'BeAr' Ederson

unread,
Oct 7, 2008, 2:45:09 PM10/7/08
to
On Tue, 07 Oct 2008 15:55:39 +0200, Thore wrote:

> I have an old dos program running... still :)

We can shake hands on this. I still use many of them... ;-)

[Print to File from XP "DOS"]

> Is there a freeware TSR that can work on the "new" setup?

Prn2File v1.1 works well under XP, even without Admin privileges:

http://home.att.net/~short.stop/freesoft/print.htm

Open a Cmd prompt and start the program using its command line switches
if necessary. (Have a look at the top of the *.asm file, where they
are all listed.) Please don't forget the /F switch, if you *only*
wish to print to file.

After Prn2File is loaded, run your program inside the same Cmd window.
Any print output will be redirected, if you got the options right. ;-)
Create a *.cmd or *.bat file starting Prn2File and your program one
after another, if you need that setup, regularly.

BeAr
--
===========================================================================
= What do you mean with: "Perfection is always an illusion"? =
===============================================================--(Oops!)===

David H. Lipman

unread,
Oct 7, 2008, 4:50:54 PM10/7/08
to
From: "Thore" <din...@mail.invalid>

| Hi...
| I have an old dos program running... still :)
| The program for invoicing/inventory (I/I) and so...
| Some 10+ years ago I had a small TSR-like program, that redirected
| lpt1-output from the dos-program. Instead of print it was directed to a
| file.
| It worked fine on a dos 6.22 PC.

| Now I have the I/I program installed on at XP-box (in a dos-window), and
| the TSR don't seem to work. ...:(

| Is there a freeware TSR that can work on the "new" setup?

This isn't a support group for such generalized questions. If you are on WinXP then you
should post in a Microsooft WinXP General news group.

However...

Share the printer such that it can be accessed through the network.

For example:
HP 1100 laser shared as \\PC_name\HP1100

The use the Net USE command such as...

net use lpt1: \\PC_name\HP1100

You can then create a BAT file such as..

Printer.BAT
--------------
@echo off
net use lpt1: \\PC_name\HP1100

And put it in the startup...
C:\Documents and Settings\All Users\Start Menu\Programs\Startup

or you can directly put the command line in to the Registry Run location.
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

This way the LPT1: printer redirection will be availble after you logon.

--
Dave
http://www.claymania.com/removal-trojan-adware.html
Multi-AV - http://www.pctipp.ch/downloads/dl/35905.asp


Josh

unread,
Oct 7, 2008, 11:17:47 PM10/7/08
to
On Tue, 07 Oct 2008 15:55:39 +0200, Thore <din...@mail.invalid>
wrote:

>Hi...
>I have an old dos program running... still :)
>The program for invoicing/inventory (I/I) and so...
>Some 10+ years ago I had a small TSR-like program, that redirected
>lpt1-output from the dos-program. Instead of print it was directed to a
>file.
>It worked fine on a dos 6.22 PC.
>
>Now I have the I/I program installed on at XP-box (in a dos-window), and
>the TSR don't seem to work. ...:(
>
>Is there a freeware TSR that can work on the "new" setup?

BeAr mentioned prn2file, which worked well for me for an old DOS
program under win9x/win2k.

But I preferred the method described by Dave Lipman, here is a link
which explains it a bit further (although Dave explained it pretty
well).

http://members.shaw.ca/bsanders/printfromdos.htm

Also, there are times when I have simply installed the "print to file"
printer (generic/text) and gone that route, usally as a quick means to
"export" data from a DOS program.

Josh


0 new messages