0

インストーラーで 1 ページ先にジャンプしようとしています。NSIS インストーラーにカスタム ページがあります。このカスタム ページでは、ユーザーにシリアル番号の入力を求めます。それらが有効な場合は、インストーラーを次のページ (ウェルカム ページ) にジャンプさせます。Initialse 関数と Finalize 関数の両方から次のページにジャンプします。

次のページにジャンプしようとするたびに、インストーラーが閉じます。試してみAbortましReturnたが、どちらもインストーラーを閉じます。Call RelGoToPageどこに$R9あるかも試しましたが1、これにより、ユーザーは既に表示されているページに戻ります。つまり、無限ループです。

何がうまくいかず、インストーラーを次のページにジャンプさせるにはどうすればよいですか。

# 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
4

1 に答える 1