Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing from DOS application

Status
Not open for further replies.

mot98

MIS
Jan 25, 2002
647
CA
I have a user that is running Win95. They use a dos application, and asked me to setup a network printer so that they can print to it from the dos application.

In the Printer setup, I specified to allow printing from dos applications. But now when ever we try to print from the dos prog, it errors out??

Is there a specific way you need to setup the printer to allow it to print from dos apps?

Any help, would be much appreciated..

TIA

mot98:)
"Where's the beer?"
 
DOS apps can be a little tricky. They don't recognize UNC printer paths like Windows uses in printing. In DOS, you had to have a physical printer port to print to. (LPT1, LPT2, or LPT3. Some DOS apps would support any of these three ports as available for printing. I have worked with other DOS apps that would not print to any other port than LPT1.

Clicking the "I print to DOS based Applications" during the printer setup is a good start... but it rarely does the job.

Go to START, SETTINGS, PRINTERS. Right-Click on the Printer that you created to use with the DOS app and click on PROPERTIES. Click on the DETAILS tab. Now... before you go changing anything, see if you can determine if your DOS app will support LPT ports higher than 1 (ie will it print to LPT2 or LPT3... some won't) If it will, I'd suggest using LPT2. LPT1 is also your hardware port on the back of the machine, so if you use this for a "virtual" or network printer, you could screw yourself up if you ever wanted to install a local printer. If you can't determine which ports your app will recognize, use LPT1... DOS apps always recognize that.

In the PRINT TO FOLLOWING PORT box, the Printer name must be preceded with a LPT1:, if it is not, if it just shows the UNC printer path, then click the down arrow to the right for the pick list... If you selected "Print from MSDOS applications" during the install, the last printer on your list should be the "LPT1: \\server\printer" selection. Make sure the printer is setup to print to that port. If the printer doesn't have an option with an LPT setting in front of it, click the CAPTURE PRINTER PORT button and create one, then go back to the PRINT TO FOLLOWING PORT box and make sure it's set to use that port.

DOS apps will always try to print to the LPT port you have them configured for... by default, Windows doesn't capture LPT ports to your windows printers... therein lies your problem.

Sorry for the long and hopefully not to confusing post... If you have anymore questions, just post back and I'll try to answer them as well as I can. I have lots of experience getting DOS apps to work under windows....
 
Thanks for the Response MISAdmin...

I did try setting it to LPT1: (\\server\printer)...

It still errors out, I am not sure if it is a limitation of the app itself or what.

From the command line in md-dos, I can print to the network printer, so this makes me believe that it is the app itself.

I have called the software vendors, but may be waiting a while to hear back from them...:) mot98:)
"Where's the beer?"
 
The application is the key.

The first step is getting it to print to the DOS port from Windows... then you need to make sure the DOS app is printing to the same port.

While your waiting for the support rep to call you back. Play with the printer setup within the DOS app to learn what it wants. (ie does it want LPT1, and not LPT2 ect ect...) Give it what it wants.

Sometimes DOS apps are limited to a handful of print drivers which they have installed (DOS apps will try and supply their own print drivers over and above what you have installed in Windows.) If you are trying to print to a Laserjet printer, look in the DOS app to see if there is a HP LJ III or HP LJ II series driver... those work on most lasers... If so, match that up on the right LPT port and you should have a winner....

 

---------------------------------

WinAids .
DOS access and PRINTouts for Win95/98/2K. Free
PRINT program enabling a Printout to be made of any ASCII file.

-------------------------------


1. Dozens of shareware to do this.
2. Go to a DOS prompt and type: DIR C:\foldername\*.* >LPT1

3. Print Folder Directories

Found this in PcWorld’s January issue:

"Here’s an easy way to print a list of the files contained in
a folder from inside Windows Explorer."

Launch Notepad, then type:

Dir %1> lpt1: and press Enter
Now type cls on the second line, BUT DO NOT PRESS Enter

There must not be anything, not even a blank line after ‘cls’.
Save the two line file in you C:\Windows\Send To folder as
printdir.BAT

Now when you want to a printout of the files in a folder, right
click on the folder in Windows Explorer, and select
Send TO->printdir.bat

---------------------------------------

Dir C:\foldername\*.* >filename.txt (this will create a text file
to do with as you please)

---------------------------------------

Folder Print:
Print Folder:
---------------------------------------

Or, if you don't want another program, here's 2 batch files,
one for creating a .txt file, the other sends it straight to
the printer.

Open Notepad (only), type in **exactly** (or copy/paste from here)

For the .txt file:

dir %1 > C:\list.txt: cls

& save as: textdir.bat

For the printer:

dir %1 > lpt1: cls

& save as: printdir.bat

I save these two files in my "Send to" folder, that way I can just
right click on the folder to execute.
 
mot98

I remember when we were using Novell netware
there use to be a capture command and direct
the local print-out to a network printer and it work.
But don't know if there is anything likewise in NT
servers.
 
I hope it's not one of those really old programs that required MS's Graphics.prn and Graphics.com. That would mean it's an ancient app!! :-0
--MiggyD

Never be afraid to try something new. Remember that amateurs built the Ark. Professionals built the Titanic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top