cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
AndrewRich
Level 5

Printing the license agreement from SdLicense

SdLicense (and its variants) has a [Print] button which sends the license file directly to the default printer using the registered handler for that filetype (notepad for .txt, wordpad for .rtf, etc). Internally, the SdLicense code uses an undocumented InstallShield function (PrintFile) to accomplish this.

			 case SD_PBUT_PRINT:
PrintFile( szFinalFile );


I have a requirement to use the standard Windows print handler--the one that comes up when you print from most applications, that allows you to select a printer and set other options--instead of printing directly.

I can't find any documentation on PrintFile or any other way of printing a file from InstallShield. Any ideas?
Labels (1)
0 Kudos
(3) Replies
RobertDickau
Flexera Alumni

Perhaps use LaunchApplication and set LAAW_SHELLEXECUTEVERB = "print"?
0 Kudos
AndrewRich
Level 5

RobertDickau wrote:
Perhaps use LaunchApplication and set LAAW_SHELLEXECUTEVERB = "print"?


Wouldn't that have the same effect? PrintFile (unless I'm greatly mistaken) does ShellExecute with the "print" verb, which in the case of .txt and .rtf files causes notepad/wordpad to immediately print the files and exit.

I think what I'm actually looking for is what happens when you load the document into notepad/wordpad and hit ctrl-p.
0 Kudos
RobertDickau
Flexera Alumni

I don't know anything about the implementation of PrintFile, but drat, yes, I was led astray by my nonstandard default text editor; using the "print" verb with a .rtf or .doc file skipped the print-settings dialog. Back to the drawing board...
0 Kudos