Printing from Command Prompt to USB device

Posted on 2005-04-30
Last Modified: 2012-06-27
I have an old DOS program that I still need to use. Up until now I have printed from the program by directing printer output to the lpt1 port.

Now I have a USB printer that I would like to print to with this program. However, when I try to direct it to USB001 (the port that is listed in the printer's properties), the DOS program's print output is directed to a file called USB001, instead of capturing and directing the output to the printer port.

How can I get this DOS program to print to the printer on the USB001 port?
Question by:jasimon9
    LVL 33

    Expert Comment

    I far as I know, you will have to save it to a file, and have the OS print it out

    You can see if you can find a DOS USB driver (if there is such a thing), that you have to make the DOS program use.

    Does the BIOS have a Legacy USB option? That might help.

    What OS you are using, and how you are running this DOS program, could give us a better idea.
    LVL 14

    Accepted Solution

    Try directing to PRN instead of LPT1 any other redirection will not work cause the program will take any other redirection to be to a Filename. Only PRN and LPT are reccomeneded to be used for printing.

    You might have to use a TSR to redirect any commands to the LPT port to the USB port.

    If this doesnt work u might try and run the program from under a Windows DOS prompt cause in that case any redirection to PRN will be automatically directed to the USB printer. You can try it and check.

    You can also try which runs under Windows but shud work for you i guess unless ur using true DOS only.

    Anotrher way is by networking wherein share your printer, then map the share to lpt1 by typing out net use lpt1: \\pc\xxxx where xxxx is the share name of the printer. You should then be able to print from most DOS apps that support LPT1: printing. However please keep in mind that some DOS apps print direct to lpt port and will not function using the net share command.

    Read here also


    Author Comment

    I forgot to mention that I had also tried PRN and it does not work either.

    Don't know what you mean by "running it under a Windows DOS prompt" as that is the only way DOS programs can run in XP as far as I know. So probably I don't know what you mean.

    None of my comments above matter anyway -- because the 4th suggestion works. I put a "net use" statement in the batch file that invokes the program, and it works!
    LVL 33

    Expert Comment

    Glad to hear it is working. And I learned something new.    : )

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Suggested Solutions

    Title # Comments Views Activity
    Selecting one CPU or two 4 67
    Do I Need a New Power Supply for My PC? 6 47
    Refurbished 16 41
    Uppercase, lowercase and mixed 1 25
    Upper back Pain: My back hurt for months. Upper back, mostly my neck, spine and across my shoulder blades. I was getting headaches too, that felt like they were caused by tension in my shoulders, but now I feel fine! I'm sharing this hoping someone…
    Great sound, comfort and fit, excellent build quality, versatility, compatibility. These are just some of the many reasons for choosing a headset from Sennheiser.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    759 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

    9 Experts available now in Live!

    Get 1:1 Help Now