2

I need to use the lpr command to copy a print file directly to a network printer. However, the lpr command does not seem to be included in 64-bit editions of Windows.

What can be done to solve this?

6

According to a list of Windows commands at about.com

Command     MS-DOS  Win 98  Win XP  Win Vista  Win 7
Lpr         N       Y       Y       Y²         Y²

[1] This command is not available in 64-bit versions of this operating system.

[2] This command is only available in this version of Windows when LPD Print Service is turned on from Windows Features.

The omissions of a 1 superscript after the Y suggests lpr can be made available by enabling the "LPR Port Monitor" using "Control Panel/Programs and Features/Turn Windows features on or off".

6

lpr works great on Win 7 and up. You do not need to copy it. In Control Panel, go to "turn windows features on or off" and make sure "print and document services" are installed.

To use lpr to send a file to printer that uses the RAW protocol, the syntax is:

lpr -S <printer name or IP> -P raw <file to send>

e.g.
lpr -S 192.168.11.118 -P raw postscript.ps

enter image description here

0

By copying the lpr* files from C:\Windows\System32 on a 32-bit Windows machine, I was able to successfully run the lpr command on a 64-bit Windows machine.

I am hoping there is a better way, though...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.