Link to home
Start Free TrialLog in
Avatar of wolf61
wolf61

asked on

DOS Based printing through USB001 in a Windows Environment

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
Avatar of qz8dsw
qz8dsw
Flag of New Zealand image

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

Avatar of hdhondt
: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
Good point hdhondt.
Best you can do is try and go from there.

Terry
Avatar of Twisteddk
Twisteddk

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 !
Avatar of wolf61

ASKER

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.
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
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
ASKER CERTIFIED SOLUTION
Avatar of Computer101
Computer101
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial