Sign in with
Sign up | Sign in
Your question
Closed

Lpr error 64 bit windows

Last response: in Windows Vista
Share
Anonymous
October 8, 2009 7:58:39 PM

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,

More about : lpr error bit windows

October 9, 2009 7:01:22 AM

Are you trying to add a printer?
Score
0
Anonymous
October 9, 2009 12:20:09 PM

fowang said:
Are you trying to add a printer?


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
Score
0
Related resources
January 20, 2010 10:09:07 AM

Quote:
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?
Score
0
January 20, 2010 10:31:34 AM

Have you tried putting the full program path ("C:\Windows\System32\lpr.exe") into the batch file?
Score
0
January 20, 2010 10:35:09 AM

Ijack said:
Have you tried putting the full program path ("C:\Windows\System32\lpr.exe") into the batch file?


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.
Score
0
July 30, 2010 6:16:43 PM

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.
Score
0
July 30, 2010 9:41:47 PM

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.
Score
0
July 30, 2010 11:04:49 PM

This topic has been closed by Mousemonkey
Score
0
!