Skip to content
⌘ NSIS Forum Archive

makensis.nsi and PageLeaveReinstall

3 posts

coco_vc#

makensis.nsi and PageLeaveReinstall

Hi all,

I was looking over the makensis.nsi and I have a question. The script checks if the product is already installed and in that case a custom page is shown with several options like: uninstall before installing, don't uninstall, uninstall or add/remove components.


Page custom PageReinstall PageLeaveReinstall
For this in "Function PageReinstall" it's checking if NSIS is already installed and if it's not installed, aborts the custom page function, by doing:

ReadRegStr $R0 HKLM "Software\NSIS" ""
StrCmp $R0 "" 0 +2
Abort
This is ok, as you want to show the page only if NSIS is already installed.
What I don't understand is: why isn't the same check done in PageLeaveReinstall as this function should also be executed only if the custom page is shown, so only if NSIS is already installed?

Thx in advance,
Viv
Afrow UK#
The Leave function is only called when the user clicks the Next button off that page. Obviously if the page is never shown, the user can't click the Next button.

-Stu