DOS application printing to USB Printer

Status
Not open for further replies.

Robin Cycle

Honorable
Nov 17, 2012
4
0
10,510
Hello, - Running either in DOS mode or from MS-DOS QBasic on a machine with XP Home installed I cannot access a USB printer attached to that machine. The print requirement is simple text or a text file. What is the simplest way to do this - I have taken a web look at PrintFil but this seems over the top for what I need.
 

Robin Cycle

Honorable
Nov 17, 2012
4
0
10,510


Hi - Unfortunately neither of the two solutions proposed in this MS document work for a USB attached printer.
On the machine the printer is attached to a virtual port known as USB001 (Not an LPT or COM port)

This port is known and routed to within Windows but not by CMD or NET.

This is best shown with a XP compliant application like WordPad - If you change the printer port to LPT1 then the print appears in the printer queue display and persists but will not actually print until you change the printer port back to USB001.
If you perform the same operation from DOS using PRINT or TYPE with a redirect then an entry line appears in the printer queue display saying "No file name". (But showing the correct print size.) However this does not persist long enough to get back in an d change the printer port back to USB001.

The MS document only deals with serial or parallel connected printers - It does not cover USB printers either connected directly to the same machine or hosted elsewhere on the LAN and used by sharing.
 
Method one always works. I use it quite a bit. I think you did it wrong. Install the USb printer (drivers) as you normally would for a USB printer and make it sharable. Note the share name. The you can use the "net use LPT2: ...." command to redirect LPT2 (or whatever LPT port you want) to the USB printer. Any program that knows how to write to a LPT port can then use the USB printer.
 

Robin Cycle

Honorable
Nov 17, 2012
4
0
10,510


Hi,
Yup had a bit of success (I think I was misled by another previous post I had looked at which involved changing the printer ports as well)

I managed to get a print onto the print queue display but could not get this to actually print even when sending a form feed character.

As I need to get the QBasic application debugged and working for my cycling club as soon as possible I have bought a copy of DOS2USB which is cheap and I am guessing uses your fix in a compiled form. I may return to the net use statements at a later date as I dislike being beaten!

Many thanks for your help - Robin
 

georgetom

Honorable
Jan 1, 2013
1
0
10,510
Please explain "make it sharable" I have a DOS prog. that can only print to LPT1 and a PC that uses USB printing - help please.
 

Robin Cycle

Honorable
Nov 17, 2012
4
0
10,510


"make it sharable" - Use the ability within Windows to share resources between machines on a local network and (I believe) into other environments (For example DOS) - See Hawkeye22's comments.

How you do this is dependent on the IOS. I use XP and on that it is via Control Panel>Printers and Faxes>then select a printer and then right click and pick Sharing

If you use a different IOS then Google share printer window together with your IOS version.

However when I followed through with the "net use" instructions I found that I could still not get the files to print although they appeared on the print queue. Moreover I found that a different USB printer (and therefore different drivers) behaved quite differently. In one case the print queue entries persisted (but would not print) in the other the print queue entries were quickly automatically wiped,

I then purchased the DOS2USB utility (very cheap, about £17 for a single copy) and this works very well. Although I suspect that it might not survive a re-install and might need a different activation key.

If you google this you can download it and run as a trial for some time before paying for the activation. A short manual is on line and it really works weel and is simple to use.
 
Status
Not open for further replies.