?
Solved

DOS Based printing through USB001 in a Windows Environment

Posted on 2007-08-02
9
Medium Priority
?
1,326 Views
Last Modified: 2008-01-09
Here is my problem. I have a customer who runs a business, using Windows XP Home SP2 printing to a new HP Laserjet 1018. Everything here works fine except for one small problem. I can not print from their main DOS BASED application. The DOS based application is basically a bunch of batch files working together under a BASIC menu system. I read some information on this particular laserjet printer and what I found out was it does not support DOS based printing, besides the fact that it is only USB (the printer). Now, my question is this. I have looked through all the batch files I can find yet nowhere do I see a referance to anything dealing with printing. I have two theories on this problem, one is that the DOS based application will only print through LPT, or it's simply that the printer will not accept this DOS based application to print to it for some other reason (I did read where this printer uses the Windows environment only to print, but I assumed that most DOS based applications would use Windows to print through). Now, do DOS applications use the Windows environment to print through? Or, perhaps this application only prints through the LPT port. The printer I removed that was bad was an old Brother laserjet that would only connect through parallel. I know it will be hard to determine if this application only prints through LPT, but I am trying to figure out if this is a standard for DOS based applications because if it is, then I can either try and modify the code to print to USB001, or I can try a cable that goes from 25pin to USB hope that works, but I really don't want to spend time spinning my wheels here.
So, do normal DOS based applications print striclty through LPT or do they use the Windows environment to feed the data to the printer (now remember, this is a very BASIC DOS based app, made with, I believe, QBasic. I don't have an editor for QBasic so I can't browse through that code, but if this is a possibility, then I won't waste time pursuing this line of troubleshooting).
Or, is it possible to get a print server that hooks up to the PC through parallel then allows for a USB hookup?
Any help on this would be greatly appreciated.
Thanks
0
Comment
Question by:wolf61
8 Comments
 
LVL 15

Expert Comment

by:qz8dsw
ID: 19619927
The problem you have is that DOS (And hence DOS Apps) know nothing about USB.
DOS Based apps expect to print to a Parallel printer.
But all is not lost.

As per here http://geekswithblogs.net/dtotzke/articles/26204.aspx
Share the printer, then use the net use command to map LPT1 to the shared printer. (Ues even if it's on the same machine)

That article also gives you a work around if that machine is a stand alone machine (Not networked), as windows will stop sharing if there is no network.

Give it a read, it should get you going.

Terry

0
 
LVL 39

Expert Comment

by:hdhondt
ID: 19621503
:qz8dsw is correct: sharing the printer and using "NET USE LPT1: \\computername\printername /persistent" will let a DOS app treat the printer as if it's connected to LPT1.

However there is anther problem. DOS apps usually only send simple ASCII commands to the printer. Many USB printers are "GDI" printers, which rely on the Windows graphics engine to do all the work, and do not know anything about ASCII. I believe the 1018 is one of those. If that is correct, you'll find that NET USE lets you send commands to the printer, but they are totally meaningless to it.

Try it, but don't get yopur hopes up. If it doesn't work, buy a slightly more expensive printer: one that supports a language like PCL5 or ESC/P
0
 
LVL 15

Expert Comment

by:qz8dsw
ID: 19622966
Good point hdhondt.
Best you can do is try and go from there.

Terry
0
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
LVL 6

Expert Comment

by:Twisteddk
ID: 19627610
I have the same problem for a couple of old financial apps.

I found that EVEN with GDI printers, you can very often "cheat" the app by installing a nice little freeware app called "dosbox". Dosbox emulates a DOS environment, including printing, 4DOS and everything, even windows  3.11 (!) It's primarly made for games, but most business apps are FAR less demanding than the games are, so it's easily able to handle a simple business app.

It's available from http://dosbox.sourceforge.net, and it's regularly updated.

Only "real" downside is that you may not be able to use ALL versions (as they change the API frequently) equally well. I had to try 3 older versions before I found one that would work with the printer. So just run through the versions one by one untill you find one that works. Note you may need to "tweak" the startup settings, but everything can be handled in batch once you've found the settings you're comfortable with.

Good luck, and happy printing !
0
 

Author Comment

by:wolf61
ID: 19746239
I just looked through and do not see the solution that I used that I got from here, may just be one of those days. Sorry it took so long for me to get back also, but the one solution using DOS2USB program worked like a champ. Whoever mentioned that little app, much thanks. I tried a couple of the other solutions, but this is the one that worked efficiently and with little user intervention. Much thanks again.
0
 
LVL 15

Expert Comment

by:qz8dsw
ID: 19766170
It's mentioned in the comments on the link I sent.
Many and varied ways some work on some machine and not on others.

Glad your going anyway.

Terry
0
 
LVL 15

Expert Comment

by:qz8dsw
ID: 19969392
Agreed with PAQ refund,
The link I sent had many varied ways and I didn't actually point to the solution myself and it could have been gotten off other sites.

Terry
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 19995676
PAQed with points refunded (125)

Computer101
EE Admin
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Step by step guide to Clean and Sort your windows registry! Introduction: Always remember: A Clean registry = Better performance = Save your invaluable time In this article we're going to clear our registry manually! Yes, manually! The e…
VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question