Printing Output from DOS Applications in W2K Pro Environmnet

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

We've got a W2K Pro PC not connected to a network. Several DOS
psychological testing programs are loaded on this PC. A Lexmark laser
printer is connected to the PC. We cannot print output from the DOS
programs to the laser printer. How can we print the output from the DOS
applications to the laser printer? If that's not possible can we print to a
file? Copy the out toi a text file will not because of formatting, etc.

Thanks,

Mike.
 
DOS programs usually print directly to LPT1 or LPT2 but Windows NT/2000
does not allow direct access to hardware. To overcome the problem
create a network share for the printer then redirect the print jobs with
Net Use command.

1- Share the printer. Click Start>Settings>Printers and right click the
printer to share. Click the Sharing tab, click Shared as and enter a
name for the shared printer, for DOS use the share name should be 8
characters or less. When done click ok.

2- Create a capture for the printer. Although you can issue a Net Use
command at anytime it is usually easier to just make a small capture
file and put it in the user startup folder, that way the printer is
always ready to accept DOS print jobs without further user actions. To
do this open Notepad and type this line:

NET USE LPT1: \\<Computer Name>\<Printer Share Name>

Where <Computer Name> is the name of the pc and <Printer Share Name> is
the name of the printer share you entered in step 1, for example:
NET USE LPT1: \\JohnDoe\lexmark

Note that you can use other LPT port numbers if the DOS sofware allows
it it could be any port number from 1 to 9, example:
NET USE LPT2: \\<Computer Name>\<Printer Share Name>
This allows you to use other printers that may be attached to the pc.

Save the file as a .bat file, for example Capture.bat. Now put the file
or a shortcut to the file in the User Startup folder, you can put it in
the "All Users" startup folder if you want the capture to always execute
when booting the pc.

In the DOS application itself you will need to configure or identify the
printer appropriately, if you see no entry for the particular Lexmark
printer check with the manufacturer, they may instruct you to use a
different Lexmark model number or even an HP laser definition.

Although this is written for NT 3.5 it still is valid for Windows 2000.
Printing from MS-DOS Applications to Local Printer
http://support.microsoft.com/default.aspx?scid=kb;en-us;109928

John
 
Back
Top