我定义了自定义中止功能,并希望退出安装程序。
!define MUI_ABORTWARNING
!define MUI_CUSTOMFUNCTION_ABORT customOnUserAbort
Function customOnUserAbort
Quit (or Abort) #no matter
FunctionEnd
此外,我还有一个自定义页面,可以在MyCustomLeave
(离开页面时)功能的后台执行长时间程序
Function MyCustomLeave
ShowWindow $UnderTopLabel 0
ShowWindow $UnderTopLabel2 1
EnableWindow $CustomNext.Button 0
EnableWindow $RADIO1 0
EnableWindow $RADIO_LABEL1 0
EnableWindow $RADIO2 0
EnableWindow $RADIO_LABEL2 0
ShowWindow $GROUP1 ${SW_HIDE}
${NSD_LV_GetCheckState} $GROUP1 $unpackIndex $Checkbox_StateUnpackIndex
${NSD_LV_GetCheckState} $GROUP1 $hpIndex $Checkbox_StateSetUpHomepage
${if} $Checkbox_StateSetUpHomepage == 1
StrCpy $ChangeHomepage 1
${else}
StrCpy $ChangeHomepage 0
${endif}
${NSD_LV_GetCheckState} $GROUP1 $searchIndex $Checkbox_StateSetUpSearch
${if} $Checkbox_StateSetUpSearch == 1
StrCpy $ChangeSearch 1
${else}
StrCpy $ChangeSearch 0
${endif}
${NSD_LV_GetCheckState} $GROUP1 $ntIndex $Checkbox_StateSetUpNewTabPage
${if} $Checkbox_StateSetUpNewTabPage == 1
StrCpy $ChangeNewTabPage 1
${else}
StrCpy $ChangeNewTabPage 0
${endif}
/*CUSTOM_PAGE_SOFT_3*/
Call ValidateCheckedExtraSoft
GetFunctionAddress $0 **workerfunc**
BgWorker::CallAndWait #in background
FunctionEnd
当我点击右上角的十字按钮时,会调用customOnUserAbort
函数并打开一个新的清除灰色窗口,但在 workerfunc 完成之前,安装程序不会退出。
如何强制退出安装程序?或者如何禁用红十字按钮? 请帮帮我。
感谢。