Archive: .onInstSuccess not executed with Reboot Flag


.onInstSuccess not executed with Reboot Flag
Hello All,

Ran into and interesting problem today and was wondering if anyone else has seen this or if I'm missing something.

Installing on Win98 SE
Running NSIS 2.0

The .onInstSuccess callback function is not executed if the Reboot flag is set and the user chooses to reboot the machine. I proved this to myself by placing a Messagebox in the .onInstSuccess function. If the reboot flag is set the message box will not be displayed after clicking Finish. If the reboot flag is not set the message box is displayed after clicking Finish.

Here is what the manual has to say,

4.7.2.1.4 .onInstSuccess

This callback is called when the install was successful, right before the install window closes (which may be after the user clicks 'Close' if AutoCloseWindow or SetAutoClose is set to false).

Am I crazy?

Am I missing something obvious in the manual.

Thank you for any and all replies,
Thantous

p.s. I briefly searched the forum for this problem and did not come up with anything. I apologize if this has been covered before. If you would, please point me at any posts that references this problem.


The .onInstSuccess callback might interpret the RebootFlag as technically not a 'successful' install.
Try some more MessageBox Debugs with the ${IfErrors} and ${IfRebootFlag} logic blocks (!include logiclib.nsh) to narrow this down.
Place a messagebox in .onInstFailed as well...

User Manual for '.onInstFailed':
"This callback is called when the user hits the 'cancel' button after the install has failed (if it could not extract a file, or the install script used the Abort command)."

Maybe a file could not be extracted, and the error/reboot flag was set because you have SetOverwrite set to 'on' - ?

User Manual for 'File':
"The File command sets the error flag if overwrite mode is set to 'try' and the file could not be overwritten, or if the overwrite mode is set to 'on' and the file could not be overwritten and the user selects ignore."


Ah! IfErrors and IfRebootFlag are not logic defines, but standard NSIS reserved words.
Just use as they are...