Archive: Print problem for installer...


Print problem for installer...
when I run the setup, on the installer first dialog, there is a link for print, when i click on it... the document inside the RichText20A opens in word.
Then i click on "Continue" button...2nd dialog appers with "End User License agreement" in RichText20A But when i click on "Back" button.
Message box with the message "Error opening the file
for writing:" appears.

This dialog has 3 options "Abort", "Retry" and "ignore".

Clicking on "Abort" stops the installation.
"Retry" - results in the same dialog
"ignore" - results in a blank "Privacy Policy" installer dialog.

any idea why this might be happening???

here's the code for onclick of print button

Function OnPrintClick_Policy
Pop $0
ExecShell "open" "$PLUGINSDIR\amex-privacy-policy.rtf" "0"
FunctionEnd


First of all, calling open on an rtf file logically won't print it. It will open it.

As for the error popup, please paste the absolute minimum script that shows this behavior in http://nsis.pastebin.com . (That is, delete all code not required to demonstrate the error.)


Where are you getting the print option from? That doesn't sound like stock NSIS. We have been asked for this feature for years now and I would love to hear how you dealt with it.


Originally posted by CrushBug
Where are you getting the print option from? That doesn't sound like stock NSIS. We have been asked for this feature for years now and I would love to hear how you dealt with it.
If you really, really, really want to print... hit MSDN and look for StartDoc.

If you only 'want to print', presumably an RTF file, try `ExecWait 'write.exe /p "c:\folder\file.rtf"'`. This will pop up a dialog asking the user if they're sure they want to print - there's no printer choice dialog for this.

Personally I'd say just open the document via the shell and let the user determine what to do with it. For all you know they use an Office solution where documents to be printed go to the legal dept. and archiving before something actually gets drawn on dead trees and a single 'print' button is insufficient anyway.

Originally posted by Animaether
If you really, really, really want to print... hit MSDN and look for StartDoc.
I am not worried about the printing, I was more curious where manasi1128 was seeing or creating the "there is a link for print" ability. That doesn't sound like the stock NSIS EULA page.

I don't want to add the functionality myself, we just keep getting asked for this feature from the legal department and we just say that NSIS doesn't support it and we can't do it. I did see this functionality on an Inno setup program, though.

Yeah, there's no stock-as-in-ships-with-NSIS solution.