Old 15th September 2010, 09:25   #1
manasi1128
Junior Member
 
Join Date: Sep 2010
Posts: 19
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
manasi1128 is offline   Reply With Quote
Old 15th September 2010, 13:15   #2
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
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.)
MSG is offline   Reply With Quote
Old 16th September 2010, 20:18   #3
CrushBug
Senior Member
 
Join Date: May 2005
Posts: 119
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.
CrushBug is offline   Reply With Quote
Old 16th September 2010, 20:42   #4
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
Quote:
Originally Posted by CrushBug View Post
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.
Animaether is offline   Reply With Quote
Old 18th September 2010, 22:43   #5
CrushBug
Senior Member
 
Join Date: May 2005
Posts: 119
Quote:
Originally Posted by Animaether View Post
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.
CrushBug is offline   Reply With Quote
Old 19th September 2010, 00:52   #6
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
Yeah, there's no stock-as-in-ships-with-NSIS solution.
Animaether is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump