Old 30th December 2011, 10:51   #1
Aaskilde
Junior Member
 
Join Date: Jan 2011
Posts: 35
Question Open link when pressing Finish?

Hi,

I need to make my installer so that when you press finish after the installation it opens a website, right now i have a checkbox but it should always open the site, so is there a way to grey out the checkbox so they cant tick it off or is there a way to make the installer so when they press finish the website will open?

//Aaskilde
Aaskilde is offline   Reply With Quote
Old 30th December 2011, 16:51   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Add a page leave function and open the website with ExecShell open.

Stu
Afrow UK is offline   Reply With Quote
Old 30th December 2011, 17:13   #3
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
The finish page is not supposed to work that way IMHO, any action on it should be optional (Don't pull an Adobe please (Flash installer opens a URL without asking))

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 9th January 2012, 08:52   #4
Aaskilde
Junior Member
 
Join Date: Jan 2011
Posts: 35
Afrow, when i need to call the leave-function i use the !define MUI_PAGE_CUSTOMFUNCTION_LEAVE? And how do i write it so that when you press the finish key the function ExecShell will be used to call the site?

Anders, it should not be optional in this case. The reason for that is the it opens contains the information in how to get the product working so they need the page.
Aaskilde is offline   Reply With Quote
Old 9th January 2012, 10:15   #5
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
code:
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE FinishPageLeave
!insertmacro MUI_PAGE_FINISH
...
Function FinishPageLeave
ExecShell open ...
FunctionEnd

Stu
Afrow UK is offline   Reply With Quote
Old 16th January 2012, 08:27   #6
Aaskilde
Junior Member
 
Join Date: Jan 2011
Posts: 35
Hi Stu,

I have tried your code, but i still just get the website shown when i press the first next, her is a part of my code:
!define MUI_ICON "neodashboard.ico"
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE FinishPageLeave

;Interface Pages
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "Program License Agreement.rtf"
!insertmacro MUI_PAGE_DIRECTORY
Page custom InstallDirectory
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH


!insertmacro MUI_LANGUAGE "English"


Function FinishPageLeave

ExecShell "open" "http://nsis.sf.net/"

FunctionEnd
Aaskilde is offline   Reply With Quote
Old 16th January 2012, 11:45   #7
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
There's no "FINISHPAGE" in the MUI_PAGE_CUSTOMFUNCTION_LEAVE define. This should tell you it's a generic define for each page. In other words, you define it before the page you are setting it for. The readme demonstrates this clearly.

Stu
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump