DOS Based printing through USB001 in a Windows Environment

Posted on 2007-08-02
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.
Question by:wolf61
    LVL 15

    Expert Comment

    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
    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.


    LVL 37

    Expert Comment

    :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
    LVL 15

    Expert Comment

    Good point hdhondt.
    Best you can do is try and go from there.

    LVL 6

    Expert Comment

    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, 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 !

    Author Comment

    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.
    LVL 15

    Expert Comment

    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.

    LVL 15

    Expert Comment

    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.

    LVL 1

    Accepted Solution

    PAQed with points refunded (125)

    EE Admin

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    cPanel is a Unix based web hosting control panel that provides a graphical interface and automation tools designed to simplify the process of hosting a web site. cPanel utilizes a 3 tier structure that provides functionality for administrators, rese…
    Issue: Unstable cursor in Windows XP and Windows runs extremely slow in that any click will bring up the Hour glass (sometimes for several seconds before giving you what you want) . Troubleshooting Process and the FINAL FIX: This issue see…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    754 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

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now