Archive: NSIS2 + Modern UI + Control 'back' button


NSIS2 + Modern UI + Control 'back' button
Hi,
I have an installer that have 3 custom pages w/ io, and i do some operations before and after and when the user clicks back, i want to do nothing after displaying.
note: i cant do before display the next custom page.
not using the modern ui i will try the next

Function CP_SetDBEngine
;if the section is checked continue else exit
SectionGetFlags ${SecEnvironment} $0
IntCmp $0 1 lbl_SetDBSetup_Continue
Goto lbl_SetDBSetup_Exit

lbl_SetDBSetup_Continue:

;some instructions

installoptions::show "ioDBSetup.ini"
Pop $0

StrCmp $0 "success" "" lbl_SetDBSetup_Exit

;some instructions

messagebox mb_ok "hey! it continues!"

lbl_SetDBSetup_Exit:
FunctionEnd

trying with modern ui, this code always goes lbl_SetDBSetup_Exit
Function CP_SetDBEngine
;if the section is checked continue else exit
SectionGetFlags ${SecEnvironment} $0
IntCmp $0 1 lbl_SetDBSetup_Continue
Abort
lbl_SetDBSetup_Continue:

;some instructions

!insertmacro MUI_INSTALLOPTIONS_DISPLAY "ioDBSetup.ini"
Pop $0

StrCmp $0 "success" "" lbl_SetDBSetup_Exit

;some instructions

messagebox mb_ok "hey! it continues!"

lbl_SetDBSetup_Exit:
FunctionEnd


someone knows how can i do this?
thanks & sorry about my poor english :rolleyes:

The Modern UI macro MUI_INSTALLOPTIONS_DISPLAY "eats" the return value of InstallOptions for you. The macro only calls InstallOptions and "eats" the return value so you can use the normal InstallOptions::show.

BTW, welcome to the forums :D


Hasta que me encuestro alguien que hable espaƱol :p


dark_boy: y eso? a que viene?
kichik: thanks. :D it works with next code:


; some instructions
Push $0
InstallOptions::dialog "$PLUGINSDIR\ioDBSetup.ini"
Pop $0
StrCmp "$0" "success" lbl_DBSetup_Display_Success
Abort

lbl_DBSetup_Display_Success:
;next instructions

This is an English forum. Please speak English only, and if you don't at least add a translation so everyone can understand.


OOPS, sorry !!!!
Lo siento :D, fue importante saber que hay personas en este
foro que hablen mi propio idioma

Sorry :D, was important to know that are people in this forum that
speak my language....

I'll never happen again...sorry, dudes :D :p