Archive: jump from INSFILES to ABORTPAGE


jump from INSFILES to ABORTPAGE
  Hi

I'm getting trouble with the UltraMUI.
On the INSTFILES page i'm trying to abort the installation and go to the ABORT page with no seccess
something like:




Section "-"
MessageBox MB_YESNO "Do you want to install?" IDYES ContinueInstall IDNO CancelInstall

CancelInstall:
Abort

ContinueInstall:
...
>SectionEnd
>
when the user click on cancel the installation aborted without goint to the abort page... does someone know why or how to fix it?

NSIS simply doesn't expect the user to cancel the setup while installing.
The "Cancel" button is grayed out for a reason while installing!
Calling "Abort" from within a section always an means abnormal termination.
I guess UMUI_PAGE_ABORT simply doesn't cover that case...


I found a way to do that in UMUI (with a little but...)!

When you call Abort from INSTFILES page the event .onInstFailed invokes and then you can call the abort page with FindWindow $0 "#32770" "" $HWNDPARENT
For example:


Section "-SomeName"

<do something..>
Messagebox MB_YESNO "Do you want to continue?"
IDYES ContinueInstall IDNO AbortINSTALL

AbortINSTALL:
Abort

ContinueInstall:
<dosomething...>

>SectionEnd

>Function .onInstFailed
FindWindow$0 "#32770" "" $HWNDPARENT
GetDlgItem$1 $HWNDPARENT 2
FunctionEnd
>
Now when you click 'No' on the messagebox the install will stop and then if you'll click on the cancel button the Abort page will pop up.

but now.. my only problem is that in the ABORT page the 'close' button is disabled and i didnt success to make it enabled... (only the right lower side 'Cancel' button is enabled and close the installer which is not good for me).

Does anyone know how to make the 'Close' button enabled? maybe some flag that i need to switch??

Try like this:

GetDlgItem $0 $HWNDPARENT X
EnableWindow $0 1


You only need to find the correct X for the "Close" button now.
AFAIK 1 is for "Next", 2 is for "Cancel" and "3" is for "Back" ...