mayPol
5th September 2006 17:38 UTC
using MUI_FINISHPAGE_LINK
Hi,
I want to add to the finish page a link to some web site.
The url is known only at the end of the installation and is stored in some variable $URL.
How can I make MUI_FINISHPAGE_LINK_LOCATION point to this URL if it is defined at the beginning of the installation.
!define MUI_FINISHPAGE_LINK ""
!define MUI_FINISHPAGE_LINK_LOCATION ""
!insertmacro MUI_PAGE_FINISH
Thanks,
May
Jnuw
5th September 2006 20:06 UTC
Since you won't know the url at compile time, I think you will need to set it with a finish page pre function.
Add this right before your "!insertmacro MUI_PAGE_FINISH":
!define MUI_PAGE_CUSTOMFUNCTION_PRE "FinishPre"
Then add the Pre function:
Function FinishPre
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "State" "$URL"
FunctionEnd
You will want to check for sure what Field # it is. Run your installer, and when it gets to the finish page, browse out to C:\Documents and Settings\<logonName>\Local Settings\Temp\nsvFE.tmp (where nsvFE.tmp is the newest folder). In this folder, will be the ioSpecial.ini, open it and confirm the Field # for that link.
This, by the way, is all in: C:\Program Files\NSIS\Docs\Modern UI\Readme.html
Hope this helps.
Jnuw
mayPol
6th September 2006 12:18 UTC
Thanks Jnuw for the quick reply.
I did:
!define MUI_PAGE_CUSTOMFUNCTION_PRE FinishPre
!define MUI_FINISHPAGE_LINK ""
!define MUI_FINISHPAGE_LINK_LOCATION ""
!insertmacro MUI_PAGE_FINISH
Function FinishPre
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "State" "$0"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Text" "web site: http://$0/SiteService.asmx"
FunctionEnd
And it works
:)
Thanks.....
Jnuw
6th September 2006 15:03 UTC
Glad I could help!