2

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 ?

user unknown
  • 1,872
Sivaa
  • 21
  • 2

2 Answers2

0

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.

Glorfindel
  • 4,158
Keltari
  • 75,447
0

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.