TRIED TO DO A DIR > PRN WHICH FAILED. TRIED TO PRINT DATA
FROM A DBASE PROGRAM WHICH ALSO FAILED. DOES ANYONE
HAVE AN INKLING HOW I CAN WORK AROUND THIS?
Is your printer either local and connected through USB, or networked with the queue elsewhere?
What sort of printer it and how does it connect to your pc?
Reason: In the days when DOS was the dominant system, the only way to connect printers was to connect them direct to the parallel printer port of a PC. Any network printers had to map to one of these ports. (this is what the Novell Netware CAPTURE program did).
Since then of course printers have joined the network, and network printers can be mapped to an LPT port and then the DOS programs can print to this, but USB printers I am not so sure about.
The printer is a "HP Laserjet 4L" and it is a local
printer attached to the PC by a parallel port. They
upgraded the PC from Win98 to WinXP. Printing from
Win98 was absolutely no problem until they upgraded
to XP. I tried to print a directory by "Dir > prn"
and that did not work then I tried to print a program
from dBase and that did not work either, but it used
to. Did not change to printer.
You need to share the printer first. Start, Printers and Faxes, Add Printer, ...etc. Give it a sharename.
Then Start, Run, CMD and use the "Net use" statement I gave previously.
The reason this likely will work is that the printer spooler will disguise to DOS any of its normal status checking for the printer available, on and ready.
James P. Cottingham
When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute and it's longer than any hour. That's relativity. [tab][tab]Albert Einstein explaining his Theory of Relativity to a group of journalists.
Add client for Microsoft Networks, and File and Printer sharing to your ethernet board properties if they are not already there.
It does not matter if it is on a network. Share the printer and Net use it.
The reason for this is that Windows is not going to let a 16-bit application have unrestricted access to the computer's hardware. This includes your parallel ports on the computer. You can:
. either use the "free" utility included with Windows called NET USE LPTx:
. or, there are Third-Party printer monitors that you can install.
But you need a virtual interface between your real mode DOS application and the protected mode of 32-bit Windows.
If it seems to transmit data to the printer, but it doesn't actually print, try
ECHO Ctrl G > LPT1
after the DIR > PRN command.
Note: Ctrl G is entered by holding down the ctrl key and pressing g, this will appear on screen as ^G.
This will sent a page feed out to the printer and should eject whatever is in the printers spooler.
With reference to earlier posts: the difference between LPT1 and PRN is that LPT1 represents the first printer port, whereas PRN represents the default printer. Most of the time they are the same thing.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.