sodcalculator

10 Tech How-To

Redirect LPT1 to USB Printer: Step-by-Step Guide

Guide 10-17409 · Updated · Step by step

If you have an older program that still prints to LPT1, but your printer connects via USB, Windows can redirect that port to the USB printer. This guide shows you how to set it up so your legacy software prints without changes.

What You’ll Need

  • A Windows PC (7, 8, 10, or 11) with the USB printer already installed and working.
  • Administrator access to the computer.
  • The name of your printer as shown in Windows (e.g., “HP LaserJet Pro”).

Step-by-Step

  1. Open Command Prompt as Administrator. Click the Start button, type cmd, right-click “Command Prompt” and choose “Run as administrator.” Confirm the UAC prompt.
  2. List existing ports. Type net use and press Enter. Note if LPT1 is already mapped—if so, you’ll need to delete it first (see Step 4).
  3. Redirect LPT1 to your USB printer. Type the following command, replacing PrinterName with the exact name of your printer (use quotes if it has spaces):
    net use LPT1 \localhost\PrinterName /persistent:yes
    For example: net use LPT1 \localhost\HP LaserJet Pro /persistent:yes
  4. If LPT1 is already in use, delete the old mapping first. Type net use LPT1 /delete and press Enter. Then run the command from Step 3 again.
  5. Test the redirect. Print a test page from your legacy program. If it doesn’t work, try printing from Notepad to confirm the printer itself is fine.
  6. Make it permanent. The /persistent:yes flag makes the mapping survive a reboot. If you ever want to remove it, run net use LPT1 /delete.

Common Mistakes

  • Using the wrong printer name. The name must match exactly what appears in Control Panel > Devices and Printers. Check for extra spaces or symbols.
  • Forgetting to run as administrator. The command will fail with “Access denied” if you don’t.
  • Not using the full UNC path. Some systems require \\localhost\PrinterName rather than just the printer name.
  • LPT1 already mapped. If another device or mapping uses LPT1, the command will fail. Delete it first.
  • Typo in the command. A single wrong letter will cause an error. Copy and paste the command to avoid mistakes.

Tips

  • Use net use without arguments to verify the mapping after you create it.
  • If your printer is shared on the network, you can also map to \\ComputerName\PrinterName instead of localhost.
  • For 32-bit legacy applications on 64-bit Windows, this method works because the mapping is system-wide.
  • If your program only prints to LPT1 and you can’t change it, this is the cleanest workaround—no need to install a virtual printer driver.
  • You can also use the print command to send a file directly: print /d:LPT1 filename.txt to test.

Troubleshooting

Error “Access denied” – You didn’t run Command Prompt as administrator. Right-click and choose “Run as administrator.”

Error “The specified printer is not installed” – The printer name is wrong or the printer is not installed for this user. Go to Devices and Printers, confirm the name, and ensure the printer is set as default.

Print job goes to the queue but never prints – Check the printer’s status. If it’s offline or paused, fix that first. Also try printing from another application to rule out the program.

Mapping disappears after reboot – You omitted /persistent:yes. Re-run the command with that flag.

LPT1 is used by another device (like a serial port) – In Device Manager, you can disable the physical LPT1 port if it’s not needed. Right-click the port and choose “Disable.” Then re-run the mapping.

Legacy program still doesn’t see LPT1 – Some very old DOS programs bypass Windows and access hardware directly. In that case, you may need a DOS-based solution like DOSBox or a virtual printer driver.

Frequently Asked Questions

Q: Will this work with any USB printer?
A: Yes, as long as the printer is installed and working in Windows. The redirect just sends data to the printer’s Windows driver.

Q: Can I redirect LPT2 or LPT3 as well?
A: Yes, you can use the same command with LPT2 or LPT3, but only if those ports are not physically present or used.

Q: Do I need to redo this after every Windows update?
A: Usually no, because the mapping is persistent. But if the printer driver is updated or reinstalled, you may need to re-run the command.

Q: Is there a way to do this without a command prompt?
A: You can use the “Add Printer” wizard to create a local port named LPT1 and point it to the USB printer, but the command line method is faster and more reliable.

Q: What if my program only prints to LPT1 and I have a network printer?
A: You can map LPT1 to a network printer using the same command, replacing \\localhost\PrinterName with \\ComputerName\PrinterName.

Q: Will this affect other programs that print to LPT1?
A: Yes, all programs that send data to LPT1 will go to the mapped printer. That’s usually what you want.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →