Archive: Modifying my finish page.


Modifying my finish page.
  I need to modify my finish page. I having some problems thou..

at the start of my script, I define that I want to call a custom pre page, before showing the finish page.


  !define MUI_WELCOMEFINISHPAGE_CUSTOMFUNCTION_INIT PreFinishPage    !insertmacro MUI_PAGE_FINISH 

>
I then have my PreFinishPage function to modify the iospecial.ini file to add my extras..


FunctionEnd 

>
The problem is, the checkbox ONLY appears when I move the mouse over it (repaint problem), and it's background is ugly grey. The repaint problem, I think, is because field 3 of the iospecial.ini is too big (bottom = 185), which I why I try to attempt to shorten it in my code.

If I open the temp plugin folder during install. I can see it's added my extra field, (field 4), but field 3 bottom is still the 185 value..

Maybe Modern UI is overwriting your value. Try searching Contrib\Modern UI\System.nsh for 185 and (temporarily) replace it.

-Stu


Try to modify ini-file in PRE function (!define MUI_PAGE_CUSTOMFUNCTION_PRE PreFinishPage).
From docs:

MUI_WELCOMEFINISHPAGE_CUSTOMFUNCTION_INIT function

This Init function is called before the InstallOptions INI file for the page is written, so you can use it to initialize any variables used in the page settings.
I think this the reason of that data do not changed (135 is replaced on 185).
And what for to add new fields? You can use MUI_FINISHPAGE_RUN checkbox.

Thanks, using MUI_PAGE_CUSTOMFUNCTION_PRE fixed the appearing item (redraw) problem.

I just have the grey border problem to fix now....

See attached screenshot.

(PS I am adding more end page items, so I cannot just use the build in MUI_FINISHPAGE_RUN, I am getting it working for 1 to start with, adding the others later...)


Set its background using SetCtlColors in the show callback function of the page.


About :!define MUI_PAGE_CUSTOMFUNCTION_PRE PreSetIni
i had DBPassword.ini file modified in my preSetIni function but it doesen't work ,Why? And i also do it as below:
Function .onInit
InitPluginsDir
File /oname=$PLUGINSDIR\DBPassword.ini "DBPassword.ini"
File /oname=$PLUGINSDIR\location.ini "location.ini"
FunctionEnd
...
pls help me! thx in advance!


Originally posted by mgillespie
Thanks, using MUI_PAGE_CUSTOMFUNCTION_PRE fixed the appearing item (redraw) problem.
Hi,
I have the appearing problem too even though I use the MUI_PAGE_CUSTOMFUNCTION_PRE. In my case I have a link, which defined as follow:
!define MUI_PAGE_CUSTOMFUNCTION_PRE FinishPre
!define MUI_FINISHPAGE_LINK ""
!define MUI_FINISHPAGE_LINK_LOCATION ""

Function FinishPre
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "State" "http://www.google.com"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Text" "Click to Brows"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Left" "121"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Right" "316"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Top" "109"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Bottom" "120"
FunctionEnd

When I look in the "ioSpecial.ini", it is updated, so why the link cannot be seen?

Thanks,
May

You must also set NumFields in [Settings].


4 

>

Thanks for the "tutorial", but I do have one question. At which point should I check the button/checkbox state (i.e. to start my 2nd program)? I was trying ".onInstSuccess", but that seems to be too late...


Add a section at the end after all other sections with no name.

Stu


Sorry, but that doesn't seem to do it. For testing purposes I was just popping up a message box and that did happen before the finishpage.


Oh I see, for the finish page.
Use:

!define MUI_PAGE_CUSTOMFUNCTION_LEAVE FinishPageLeave
!insertmacro MUI_PAGE_FINISH

Function FinishPageLeave
!insertmacro MUI_INSTALLOPTIONS_READ $R0 "ioSpecial.ini" "Field 4" "State"
StrCmp $R0 0 +2
Exec ...
FunctionEnd


Stu

Nice, that did it - thanks!