![]() |
InstantTrack Tutorial: |
InstantTrack is a DOS program. It knows how to print to files or to printers like LPT1. Nowadays printers are rarely connected to LPT1. More often, they are on a USB interface, or on the network. Windows makes these printers available to Windows programs, designated by nice, friendly names. Unfortunately DOS programs don't have access to that printing mechanism, and are still restricted to the old LPT1-style printer interface.
Earlier versions of Windows included all sorts of tricks to make it easy to run old DOS programs. Whenever you installed a new printer, Windows would ask you if you wanted to print from DOS programs. If you said yes, it would set up an imaginary LPTx port for you, and make that LPT port connect to the new printer, regardless of what actual interface it was on. InstantTrack, or any other DOS program, could print using the imaginary LPT port, and it would work.
Microsoft's marketing spin for Windows XP was that it eliminated compatibility with DOS programs (presumably making the system more modern, more efficient, and more reliable). Luckily for those of us who like InstantTrack, this was mostly a fib. InstantTrack runs fine under Windows XP. However, the automatic question about printing from DOS is no longer asked. In order to print from DOS to a printer that's not connected to an old-fashioned LPT port, the user has to say some magic words.
This tutorial shows you how.
Install the printer according to the manufacturer's instructions, and verify that it works normally with Windows programs. Details of this are outside the scope of this tutorial, but generally speaking it is pretty painless if your printer is modern enough to be supported by XP.
The printer must be able to accept plain text input. All standalone printers can do this, but some Windows-only ("GDI") printers cannot. Avoid those printers. If you must use one, the technique described here will not work. There are commercial and shareware applications available that bridge the gap. They will also let you "print" to virtual printers, such as a fax program or PDF writer. Or, you could just print to a file from InstantTrack and then use a Windows program (e.g., Notepad) to open the file and print it.
The trick we're going to use simulates network access to the printer, so you must enable printer sharing. This will allow other people on your local network, if any, to print on your printer. If that bothers you, then stop here.
In the Start menu, click on Printers and
Faxes as shown here.
Find the printer you want to use. Right-click on it, and select
Sharing... from the pop-up menu, as shown here.
On the Sharing tab, turn on Share this
printer and give it a suitable name. In this example, the printer
is an HP PhotoSmart 7660, so I named it hp7660.
Click OK to make the changes take effect.
If you don't already know the network name of your computer,
right-click on My Computer and select
Properties from the pop-up menu. Click on the
Computer Name tab. You want the name labeled Computer
full name. In this example, the computer is named BIJAZ.
You need to run a command line. One way to do this is to open a
Command Prompt window, which looks just like the screen of
an old DOS computer. From the Start menu, click All
Programs, then Accessories, then Command
Prompt, as shown here.
A DOS window opens. Make sure that window is active, and type the
following:
net use lpt1 \\Bijaz\hp7660
/persistent:yes
and hit Return. Like so:
Of course, you will substitute your own computer name for
Bijaz and your own printer name for hp7660. Be
careful with the slashes. That's net use lpt1, a space, two
backslashes, the computer name, another backslash, the printer name,
another space, a forward slash, the word "persistent"
(spell it carefully), a colon, and the word "yes". Then hit
Return.
I've used LPT1 in this example. However, if you already have a printer on LPT1, you should use LPT2 or LPT3, whichever is open.
From then on, even after a reboot, you can refer to your printer as LPT1 inside InstantTrack or any other DOS program. See the InstantTrack manual for information on how to print ephemeris tables from inside the program.
If you want to remove an imaginary LPT port,
get a Command Prompt window as in step 4 and type a command
like this:
net use lpt1 /delete
You can then disable sharing for that printer, if desired, by
following step 2 but turn on Do not share this printer.
The /persistent:yes bit is
supposed to make this setting "stick" permanently, even
through a reboot. Some users have reported that this doesn't work on
their systems.
You can work around the problem by putting the NET USE
command into a batch file. The simplest thing would probably be to put
the NET USE command into the special batch file named
AUTOEXEC.NT, located in the
C:\WINDOWS\SYSTEM32 directory. This batch file is run
whenever Windows XP sets up a DOS environment, so it should have
run before you get a chance to run InstantTrack.
Open the file C:\WINDOWS\SYSTEM32\AUTOEXEC.NT with a
plain text editor, such as NOTEPAD. You may have to type in
the whole path, since files in that directory may be hidden. If the file
doesn't exist, create a new one with that exact name. Add the NET
USE command to it, just as you typed it in step 4 above. In
most cases you can put the command anywhere in the file; if there is
fancy stuff in the file it will probably be safest to put the NET
USE command at the very top of the file. Save the file. You may
need to reboot or at least log off at this point. From then on, your DOS
sessions should all have access to the imaginary LPT port.
Another option would be to place the NET USE command into a batch
file that you use to start InstantTrack (before the IT
command that starts the program). That should work, too. It probably will not
hurt if you execute the NET USE command multiple times with the same
settings. It would be cleaner to also add a line like
NET USE LPT1 /DELETE
after the command that starts the program. But I'd suggest just
putting the NET USE command into AUTOEXEC.NT
so you don't ever have to
worry about it, unless you find it causes problems with some other
program.
Naturally, if you do this and later want to undo it, you'll have to edit
C:\WINDOWS\SYSTEM32\AUTOEXEC.NT again and remove the
NET USE command.
If this doesn't work for you, you can always use a temporary file.
In InstantTrack, make up a filename and use that at the
Enter name of output file: prompt to save the output to a file.
Then go into a Windows text-editing or word processing program, such as
Notepad, open the file (it will be in C:\IT by
default), and print it from the File
menu of that program.
Copyright 2004-2005 Paul Williamson. All Rights Reserved.
Last updated 6 September 2005. Comments to kb5mu@amsat.org