Old 29th April 2011, 09:18   #1
nsichildnew
Junior Member
 
Join Date: Apr 2011
Posts: 6
call pre function of mui component page only when required

Can PRE function of a MUI dialog be called only when required?

!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipComponentsPage
!insertmacro MUI_PAGE_COMPONENTS

Function SkipComponentsPage
Abort
MessageBox MB_OK "You chose to UPDATE your current version"
FunctionEnd
//This section will be checked by default, that is , user will not be able to select or unselect this section , this has to be executed..........how to do this?To hide it , i have included a - sign in its name. its name is "mandatory"

Section "-mandatory" SEC_UPDATE
#Do update............
SectionEnd
I have two RadioButtons (Demo & Update) on my custom dialog page in the NSIS installer. I want that when the user choses to install the UPDATE (choses the UPDATE RadioButton), then the Components Page is skipped , and a specified Section is auto CHECKED and executed.

But if the user choses to install the DEM (choses the DEMO RadioButton) , then the Components page is not skipped & the user can Check or Uncheck Sections on that Component page
nsichildnew is offline   Reply With Quote
Old 29th April 2011, 09:58   #2
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
in your custom page's leave function, store the state of the radiobutton in a variable. Then do

Function SkipComponentsPage
${If} $yourVar == "update"
Abort
${EndIf}
FunctionEnd
MSG is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
component dialog, mui, pre-function, section

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