nsisnsis-mui

NSIS: How to distinguish between Cancel and Close button


In NSIS, on a custom page, I want to skip the page when the user presses the Cancel button, but I want to exit the installer (with confirmation) when the user presses the window's X button. How do I do that?

Currently, by using Modern UI and custom abort function, I get the same function called regardless of which of the two buttons is pressed.


Solution

  • This is not normal installer behavior and I would not recommend that you try to implement this.

    If you still want to try I guess it might be possible with the ButtonEvent plug-in or the WndSubclass plug-in...