Reputation: 12126
We have a piece of software that attempts to print .tif images using a ProcessStartInfo object. It sets the Verb property to "print" and the FileName property to the path of the image. It then sets the UseShellExecute property to true and executes the Process.Start() method.
However, nothing happens. I created a small test program to list the Verbs associated with .tif images and it only shows "Shell", but not "print".
I cannot modify this piece of software, so is there a way to define or register the "print" verb for .tif image types to allow them to print?
Upvotes: 0
Views: 2200
Reputation: 26790
First of all, the verb you're probably looking for is probably printto
You could also shell execute the print command directly, with
"%SystemRoot%\System32\rundll32.exe" "%SystemRoot%\System32\shimgvw.dll",ImageView_PrintTo /pt "%1" "%2" "%3" "%4"
The parameters are explained in KB224961 as:
%1 File name
%2 Printer name
%3 Driver name
%4 Port name
/p Print
pt Printto
Upvotes: 2