Skip to content
⌘ NSIS Forum Archive

!define MUI_FINISHPAGE_RUN at run-time

6 posts

kniffte#

!define MUI_FINISHPAGE_RUN at run-time

Hello,

my installer incorporates a number of different options (nothing new, I guess...). As a result, in some cases MUI_FINISHPAGE_RUN is to be set, in some cases it isn't. This decision is to be made at run-time (there is no way to do this at compile-time).

- I tried to set MUI_FINISHPAGE_RUN = "", but this only leads to an empty command; the button is displayed anyway.
- I also tried to !undef MUI_FINISHPAGE_RUN, but that is not conditional to run-time result either.

Is there another way to do so?

Thanks in advance,

kniffte
jpderuiter#
Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.
kniffte#
Hello jpderuiter,

Actually, http://forums.winamp.com/showthread...threadid=302774 helped me more ... but thank you anyway.



Bye,

kniffte

PS: I tried now 5 times to insert the address in a readable format, but the forum seems not to support that. The link refers to this forum's thread # 302774.
jpderuiter#
Originally posted by kniffte
Hello jpderuiter,

Actually, http://forums.winamp.com/showthread...threadid=302774 helped me more ... but thank you anyway.



Bye,

kniffte

PS: I tried now 5 times to insert the address in a readable format, but the forum seems not to support that. The link refers to this forum's thread # 302774.
OK, it was the first topic I found that appeared to be usefull.
But you got the point anyway.

About the link:
To prevent SPAM links will only be visible from users with a certain amount of posts.
Other users still can see the link you provided by clicking the "Quote" button.
To prevent an URL being converted to a link you can also unselect "Automatically parse URLs" when you submit a post.
CrushBug#
Re: !define MUI_FINISHPAGE_RUN at run-time

Originally posted by kniffte
Hello,

my installer incorporates a number of different options (nothing new, I guess...). As a result, in some cases MUI_FINISHPAGE_RUN is to be set, in some cases it isn't. This decision is to be made at run-time (there is no way to do this at compile-time).

- I tried to set MUI_FINISHPAGE_RUN = "", but this only leads to an empty command; the button is displayed anyway.
- I also tried to !undef MUI_FINISHPAGE_RUN, but that is not conditional to run-time result either.

Is there another way to do so?

Thanks in advance,

kniffte
I just ran into this exact situation last week. I am using MUI2, so I was able to do this.

I did this for my finish page:

!define MUI_FINISHPAGE_RUN "$FinishEXE"
!define MUI_PAGE_CUSTOMFUNCTION_SHOW ShowFunction_Finish
!insertmacro MUI_PAGE_FINISH 
$FinishEXE is the variable that holds the full path to the executable I want to run off of the Finish page. If it is a quit or an abort, I set $FinishEXE to "".

The MUI_PAGE_CUSTOMFUNCTION_SHOW in this case is after the dialog items are rendered.

Function ShowFunction_Finish
    ${If} $FinishEXE == ""
        ;no value, thus uncheck and hide the run checkbox
        ${NSD_Uncheck} $mui.FinishPage.Run
        ShowWindow $mui.FinishPage.Run ${SW_HIDE}
    ${EndIf}
FunctionEnd ;ShowFunction_Finish 
I hope that helps.