Lpr error 64 bit windows

Status
Not open for further replies.
G

Guest

Guest
Using lpr client from the command line has always been available on Windows 32 bit systems. In attempting to use this on a 64 bit system, I get "command not found".
What do I need to do in order to do lpr -S -P from the command line on Windows 64?
Thanks,
 
G

Guest

Guest


No,

I am just trying to invoke a DOS command (lpr) from a C appl using the system() call.
I found that you have to enable the "LPR Port Monitor".
This via the "Control Panel/Programs and Features/Turn Windows features on or off".
I can now do
lpr -S 10.10.10.10 -P Printer test.fil
from a DOS prompt and it works.
When I try to do the same thing in an application from a system call
system("lpr -S 10.10.10.10 -P Printer test.fil");
I get
'lpr' is not recognized as an internal or external command
 

ullerdk

Distinguished
Jan 20, 2010
2
0
18,510
No,

I am just trying to invoke a DOS command (lpr) from a C appl using the system() call.
I found that you have to enable the "LPR Port Monitor".
This via the "Control Panel/Programs and Features/Turn Windows features on or off".
I can now do
lpr -S 10.10.10.10 -P Printer test.fil
from a DOS prompt and it works.
When I try to do the same thing in an application from a system call
system("lpr -S 10.10.10.10 -P Printer test.fil");
I get
'lpr' is not recognized as an internal or external command


I have exactly the same problem on a Windows 7 64-bit computer. Trying to call a batch-file with LPR command from a 32-bit application.
Did you find a work-a-round?
 

ullerdk

Distinguished
Jan 20, 2010
2
0
18,510


Yes I have, but 64-bit files located in c:\windows\system32 is not seen by a 32-bit command prompt (c:\windows\syswow64\cmd.exe) which is launched when call at batch file from a 32-bit application.
 

CraigJ@OpenText

Distinguished
Jul 30, 2010
2
0
18,510
I have the same program. I am trying to get a 32 bit program to launch lpr.exe inside of Windows 2008 R2. It fails because lpr.exe does not exist in the 32 bit view of the O/S. I also tested using the syswow64 version of cmd.exe and launch from the command line and it does not exist.

For a work-around, I copied lpr*.* from a 32 bit O/S system32 folder into SYSWOW64 on the 2008 R2 machine. THAT WORKED. Now to get Microsoft to provide a statement or work-around, describing this problem, would be very nice.
 

CraigJ@OpenText

Distinguished
Jul 30, 2010
2
0
18,510
I also found that if you use fileexplorer to copy lpr.exe, lprhelp.dll, and lprmonui.dll from the System32 folder to the sysWOW64 folder, this will also solve your problem. That seems like a better solution since these files already exist on the hard drive. The 32 bit version of cmd.exe as well as any 32 bit programs that need to launch lpr.exe should successfully be able to now. This is still just a work-around until MS decides to resolve this in an update. I plan to open an incident with MS to encourage them to do just that.
 
Status
Not open for further replies.