manasi1128
15th September 2010 10:25 UTC
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
MSG
15th September 2010 14:15 UTC
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.)
CrushBug
16th September 2010 21:18 UTC
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.
Animaether
16th September 2010 21:42 UTC
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.
CrushBug
18th September 2010 23:43 UTC
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.
Animaether
19th September 2010 01:52 UTC
Yeah, there's no stock-as-in-ships-with-NSIS solution.