Archive: Custom page before finish page


Custom page before finish page
I'm using the ModernUI interface and I want to insert a custom page just before the finish page.

So the script has such a section:

!define MUI_FINISHPAGE
!define MUI_FINISHPAGE_NOAUTOCLOSE
!define MUI_FINISHPAGE_RUN "$INSTDIR\myprogram.exe"
!define MUI_FINISHPAGE_NOREBOOTSUPPORT

!insertmacro MUI_PAGECOMMAND_WELCOME
!insertmacro MUI_PAGECOMMAND_LICENSE
!insertmacro MUI_PAGECOMMAND_COMPONENTS
!insertmacro MUI_PAGECOMMAND_DIRECTORY
!insertmacro MUI_PAGECOMMAND_STARTMENU
!insertmacro MUI_PAGECOMMAND_INSTFILES
Page custom ShowTasks "$(TASKS_TITLE)"
!insertmacro MUI_PAGECOMMAND_FINISH

But I've two problems:
* If in the custom page the user press the X to close the install program, instead of displaying the usual message ("Are you sure, etc..") appears the finish page.
* If in the finish page the user clicks "back", the program (that defined in "!define MUI_FINISHPAGE_RUN") is executed.


I can fix the second problem (Back button) in the Modern UI.

The first one seems to be a NSIS prob, I'll ask kichik.


After all of the files have been installed there is nothing to cancel. Canceling won't revert changes and won't uninstall files already installed. Therefore I don't think it should show the cancel message box anyway.


Fixed the Back button problem :D Grab the latest files from CVS or use NSIS Update.

Kichik will add an options to the Page command to activate the Cancel option and ungrey the Cancel button. The Modern UI will use it for the Finish page.


Originally posted by kichik
After all of the files have been installed there is nothing to cancel. Canceling won't revert changes and won't uninstall files already installed. Therefore I don't think it should show the cancel message box anyway.
Sure, I too think so, but clicking the cancel box should close the program, not to show the finish page.

Thanks for the corrections (to both of you).

When cancel is greyed out, X acts the same as the Next button. This will be fixed.


All fixed :D


I too had this problem, when having the custom page before the instfiles page.
If I clicked back while on my custom page, it would drag the Install button onto the back page (dirpage) and then grey it out.
I just changed the mui_pagecommand_directory macro in the mui system.nsh to a Page Custom MyPage, and blanked out the mui Page directory line.
This fixed it.

-Stuart


A custom page before the instfiles page should really be no problem. Even the InstallOptions.nsi Modern UI example does that.

Can you give more details?