0

我正在尝试检测用户在许可证页面上取消设置。我已经尝试过Function .onInstFailed,但它仅在安装被进一步中止时才被调用。当用户在许可页面取消时不会触发。这是可行的吗?这是我的脚本的顶部。只有在点击I Agreelicleave时才会调用函数。

!include nsdialogs.nsh
!include MUI2.nsh
!define MUI_PAGE_CUSTOMFUNCTION_SHOW licshow
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE licleave
!insertmacro MUI_PAGE_LICENSE "license.txt"
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
4

1 回答 1

1

You can define your own MUI_CUSTOMFUNCTION_ABORT function to process the page cancel.

As suggested in that NSIS forum thread, you could set a flag to 1 when entering the license page, and set it to 0 when leaving the page.

In the abort callback, test the flag: if set then you just canceling the license page.

于 2012-08-29T12:06:03.233 回答