# printing from DOS



## CLag (Dec 5, 2004)

I have a new DELL XPS with Windows XP pro. I just installed a parallel port which is now working on LPT1 port. I can print from WORD and I can print a test page from the printer properties. When I try to print from my DOS app the print job does not even show up in the Printer que. I have an Okidata 321 connected.


----------



## steigrafx (Sep 27, 2005)

A few changes need to be made in order for your DOS app to print.

First, you need to enable sharing on the printer. Go to the printer and right click, then click on Sharing. Enable sharing and give the printer a name. For this example, let's assume you've given the printer the name okidata.

Next, you need to issue the "net use" command at a command prompt. You'll need to know your computer's name. Let's assume the PC is named MyPC. Here is the syntax of the command (issue at a command prompt):

net use lpt1: \\MyPC\okidata /persistent:yes
(spaces are single spaces -- I made double spaces so you could see them easily.)

The /persistent:yes switch means that the command will automatically be issued everytime you reboot your PC -- you won't have to issue it over and over.

What this does is "capture" the print job directed by your DOS app to LPT1 and redirects it to the shared printer called okidata found on the PC named MyPC. See if this works for you.

If you need to delete the net use command, at a command prompt type:

net use lpt1: /delete


----------



## CLag (Dec 5, 2004)

How do I look at my "computer name". I am not sure what name I gave it.


----------



## CLag (Dec 5, 2004)

Ignore that last question. I found the computer name

Thanks


----------



## CLag (Dec 5, 2004)

steigrafx said:


> A few changes need to be made in order for your DOS app to print.
> 
> First, you need to enable sharing on the printer. Go to the printer and right click, then click on Sharing. Enable sharing and give the printer a name. For this example, let's assume you've given the printer the name okidata.
> 
> ...


I did all this and I am almost to a solution:

The output got to the print que but would not print. When I look at the document status, the status is in a loop switching from "printing" to "deleting - printing - printed" and back to "printing". At the same time a second line shows up momentarily showing "spooling" as the status. The print job never prints while the status in this loop.


----------



## JohnWill (Oct 19, 2002)

Here's an MS-KB article about the topic: http://support.microsoft.com/kb/314499

Here's a tip about printing directly: http://searchwincomputing.techtarget.com/tip/0,289483,sid68_gci1040167,00.html

The cheap commercial spread, DOS Printer

The expensive commercial spread, DOSPRINT


----------



## steigrafx (Sep 27, 2005)

I just helped a church with the same problem. The problem was they were using the driver from Windows. I had them download the driver from the manufacturer and everything worked fine.


----------

