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

The laser printer is attached to my XP system using a USB cable. The printer is 'shared'. I am trying to print a .prn file using a command line-type batch file. I have some success, and a major issue. I can print the file ok as long as my Ethernet cable is attached to my XP system. When the Ethernet cable is removed, I get an error (network disconnected) and nothing prints.

I am using two command lines:
c:\net use lpt2: \\\myprinter (where myprinter is the shared printer name)
c:\copy /b *.prn lpt2:

I thought when I shared the printer, I virtually created an independent loop-back Server service that would remain instantiated even if I removed the Ethernet cable (disconnect the local network). Guess this is not the case.

What am I missing, here? How can I print to the USB laser printer without having the Ethernet cable connected?

share|improve this question
Typos in the command lines. Should be, c:\net use lpt2: \\\myprinter, and c:\copy *.prn /b lpt2: – kgarvey Dec 28 '12 at 21:59
You can edit your own question (it's encouraged ;) ). – Ƭᴇcʜιᴇ007 Dec 28 '12 at 22:04

A USB connection is not the same as a network. the Net command is for performing Networking actions (in this case, mapping the network printer to LPT2), which won't work via USB (without setting up some kind of USB IP network).

Perhaps check out Print an ASCII file to a printer connected through USB and How do I simulate a parallel (LPT) Printer with a USB Printer? for into on mapping LPT ports to a USB printer.

share|improve this answer

We used to do this a lot. You install the Microsoft loopback adapter into the network connections as a network device using the instructions in The loopback should allow net commands to run even if you don't have an actual ethernet connection. Do the needed settings for IP addresses... Then you share the printer, net use lptx: \computername\sharename and then you print to the selected lpt port. Keep in mind that laser printers are page printers - you may need a formfeed to eject a page, and/or send a formfeed - something like creating a formfeed character into a file and sending that file to the printer after your desired job.

share|improve this answer

There is program for this purpose. DOSPRN supports printing from DOS on almost any kind of printer. including USB-printers

It has other features as well


share|improve this answer

You must log in to answer this question.

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