Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

From my working program, I need to print an ASCII file to a printer connected through USB. So far this was working fine as we used LPT1 with the following command.

Type filename > prn

But the necessity to switch over to USB is becoming a must for very obvious reasons.

Seems Net Use is one way to map it to LPT. Is there any other way, particularly to work out in Windows 7 and XP ?

share|improve this question

Here are directions on how to do it. A little long to cut and paste into the text box, but looks easy enough to do.

share|improve this answer
I tried that. But it's not working if I need to print from the same computer (print server is the same machine). Also the net use command will not work in Win'7 ( I read that in somewhere in internet while searching for this solution) – Sivaa Aug 25 '11 at 13:23
I have used "net use" in win 7... a quick google search and couldnt find anything saying its no longer functioning. – Keltari Aug 25 '11 at 15:00
Tried but couldn't find where I read it last (net use & Win 7). I could recollect that it's from some usergroup's Q & A section. – Sivaa Aug 27 '11 at 14:56

How to get a USB printer available as LPT1:

  1. Install the Microsoft Loopback network adapter. (How-to: Windows XP, Windows 7)
  2. Share the printer. (How-to: Windows XP, Windows 7)
  3. Run NET USE LPT1: \\<your computer name>\<printer share name> /PERSISTENT:YES in a command prompt (or alike).

If you have a physical LPT port in the computer (a parallel port), you may have to disable it in the BIOS (or maybe even just in the Device Manager) to be able to use LPT1. You can probably also get away with just mapping to LPT2 instead.

share|improve this answer
Well, if I've only one computer, will it work ? It didn't work for me. That's why I posted it here. Any other ways ? In the meantime, let me give it another try... – Sivaa Aug 25 '11 at 13:46
The intention to the Loopback adapter is because you only have one computer (or more specifically, no active network). What "didn't work" about it? The differences between XP and 7's printing subsystems (and how they're treated) makes it tricky to have seamless, uniform solutions. – Ƭᴇcʜιᴇ007 Aug 25 '11 at 13:53
I tried it in WinXP, disabled LPT1 in the device manager, installed loop back adapter, restarted machine. But no luck. Net use command gave 'successful' result. Network loopback adapter was found in the Device Manager. But No output in the printer when I ran the command, 'Copy filename lpt2' and type filename > lpt2. Couldn't figure out what went wrong. – Sivaa Aug 27 '11 at 14:48
One more improvement I noticed. When I run the command, the file appears in the printers' properties. Seems the redirection part is working, but with no output. – Sivaa Aug 27 '11 at 15:12
@sivaa So after you run type filename > lpt2 the job shows up in the printer's queue, but it doesn't print? Is the printer working otherwise? – Ƭᴇcʜιᴇ007 Aug 27 '11 at 21:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .