Search code examples
dynamicradio-buttonnsis

NSIS- How can I dynamically show a particular custom page?


My 1st page contains 2 radio buttons: 1 for install and other for upgrade. Depending upon user selection I have to show custom pages for installation or upgradation. How can I do this?


Solution

  • If you call abort in the create function callback for your custom page, the page will be skipped:

    Function MyPage
    ${If} $somevar == "something"
    Abort
    ${EndIf}
    ;Show page with nsDialogs or InstallOptions here...
    FunctionEnd
    
    page custom MyPage