Archive: page skip not skipping


page skip not skipping
I'm having some trouble getting a page to skip properly. I'm using the following code: page instfiles JRE_CHECK

The JRE_CHECK function Aborts if the installation page doesn't need to be run. No files are installed, but it still shows an empty page with a next button. What do I need to to in order to make the page skip completely?

Thanks


Try using Abort - this is what the NSIS installer uses when checking for previously installed versions.


I am using Abort (look at the first line of the second paragraph)


Do you happen to be skipping two pages in succession? If this is the case, then it does that for some reason (you get an empty page). You need to use this: http://nsis.sourceforge.net/archive/...php?pageid=575

If that isn't the case, then try making a cut-down version of your script which produces the same problem for us to look at.

-Stu


no I'm only trying to skip one page. Here is some very stripped down code that produces the same effect, the .exe that this code compiled into can be found at http://ucsu.colorado.edu/~romanysh/skip.exe

;--------------------------------
;Include Modern UI

!include "MUI.nsh"

;--------------------------------
;General

;Name and file
Name "skip"
OutFile "skip.exe"

LicenseData ".\PlaceholderFTLLicense.txt"

;--------------------------------
;Pages

!insertmacro MUI_PAGE_WELCOME
page instfiles JRE_CHECK "" ""
page license


;--------------------------------
;Languages

!insertmacro MUI_LANGUAGE "English"

;--------------------------------
;Installer Sections


Section "Install Java" IJAVA

SectionEnd


;-----------------------

Function JRE_CHECK

Abort

FunctionEnd


First thing that I found wrong with your script, is that you're using Modern UI, but you aren't using the MUI page macros:


!insertmacro MUI_PAGE_WELCOME
!define MUI_PAGE_CUSTOMFUNCTION_PRE JRE_CHECK
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_LICENSE ".\PlaceholderFTLLicense.txt"


Still, however, Abort does not work.
So you need to use this instead:
http://nsis.sourceforge.net/archive/...ances=0,11,814

Perhaps this is a new bug.

-Stu

Use SetAutoClose true before calling Abort.