Skip to content
⌘ NSIS Forum Archive

Skip Welcome dialog

5 posts

Alfaromeo#

Skip Welcome dialog

Welcome dialog is the first in my sequence. On fresh install the dialog is shown . I need to skip the same to installfiles based on a condition (on version being higher means an upgrade)
redxii#
Use MUI_PAGE_CUSTOMFUNCTION_PRE function before inserting the welcome page:
!define MUI_PAGE_CUSTOMFUNCTION_PRE PageWelcomePre
!insertmacro MUI_PAGE_WELCOME
...
Function PageWelcomePre
  ${If} $UPGRADE == 1
    Abort
  ${EndIf}
FunctionEnd 
However it is that you determine that is an upgrade/higher version. Calling Abort skips the page.
Alfaromeo#
Yes that is what I intend to do. But for some reason it does not fire the Prefunction .

define MUI_PAGE_CUSTOMFUNCTION_PRE WelcomePre

Page custom nsDialogs ( this is a custom welcome nsdialog)


In the WelcomePre function I have given a MessageBox , it does not show up at all.
What is wrong here .
redxii#
If it's a custom Welcome page, then in the custom Welcome page function, before nsDialogs::Create , test to see if it is an upgrade and call Abort if it is an upgrade.
Function nsDialogs
  ${If} $UPGRADE == 1
    Abort
  ${EndIf}
  nsDialogs::Create /NOUNLOAD 1018
  Pop $0
  blah blah
  nsDialogs::Show
FunctionEnd