Q. How can I cause the Windows Picture and Fax Viewer to print from the command-line?

Jerold Schulman

November 12, 2006

1 Min Read
ITPro Today logo

I have scripted PrtWinPicFax.bat to cause the Windows Picture and Fax Viewer to print a file that you specify to a printer that you specify, from the command line. No GUI or popup is displayed.

The syntax for using PrtWinPicFax.bat is:

PrtWinPicFax File Printer

Where:

File    is the fully qualified file name that contains the image you wish to print.Printer is the printer that will render the image, like any of the following:                      "HP Officejet 6200 series"                      \JSI001HP2250                       "\JSI001.JSIINC.COMHP Business Inkjet 2250 (PCL5C)"

PrtWinPicFax.bat contains:

@echo offif {%2}=={} @echo Syntax: PrtWinPicFax File Printer&goto :EOFrundll32.exe %SystemRoot%System32shimgvw.dll,ImageView_PrintTo /pt %1 %2


Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like