我正在尝试在我的安装程序中向前跳转 1 页。我的 NSIS 安装程序中有一个自定义页面。此自定义页面提示用户输入序列号。如果它们是有效的,我会将安装程序跳转到下一页(欢迎页面),否则我们会留在页面上。我将从 Initialse 和 Finalize 函数中跳到下一页。
每次我尝试跳转到下一页时,安装程序都会关闭。我已经尝试过Abort
,Return
但都导致安装程序关闭。我也尝试过Call RelGoToPage
where $R9
is1
但这会将用户发回他们已经在的页面,即无限循环。
出了什么问题,我怎样才能让我的安装程序跳转到下一页。
# Page Definition
Page Custom SerialPageInitialise SerialPageFinalise
# Page Implementation
Function SerialPageInitialise
!insertmacro ValidateSUser
${If} $isValidUser > 0 # If user if valid
Return # Go to next page...Doesn't work just closes the whole installer
#Abort # Doesn't work just closes the whole installer
${EndIf}
FunctionEnd
# For the following function: the message "A" always shows then the installer closes
Function SerialPageFinalise
${NSD_GetText} $SerialEditBx $R9
!insertmacro ValidateUserExpanded "$R9"
${If} $isValidUser > 0 # If user if valid
MessageBox MB_OK "A"
${Else}
MessageBox MB_OK|MB_ICONEXCLAMATION "Authentication Failed. You are not a recognised client."
Abort
${EndIf}
FunctionEnd