NSIS function - exit the installer

In my NSIS installer, I have a custom function where the user has 2 radio buttons. Selecting the first one and clicking Next installs the software. Selecting the second one (Browse) and clicking Next displays the HTML file found on the installation media.

Everything works, but I would like to actually exit the installer when the user selects the view option and the HTML page is displayed. Any idea how to do this?

On my custom page, I have the following:

    ${NSD_CreateRadioButton} 70 95 40% 6% "Install the Manuals to your PC"
        Pop $hwnd
        ${NSD_AddStyle} $hwnd ${WS_GROUP}
        ${NSD_SetUserData} $hwnd "true"
        ${NSD_OnClick} $hwnd RadioClick
    ${NSD_CreateRadioButton} 70 175 40% 6% "Browse the $MEDIUM content"
        Pop $hwnd
        ${NSD_SetUserData} $hwnd "false"
        ${NSD_OnClick} $hwnd RadioClick

      

I have a function that receives data:

Function RadioClick
    Pop $hwnd
    ${NSD_GetUserData} $hwnd $inst
FunctionEnd

      

And finally, a function that does stuff with this data (start installing or watching):

Function post
    ${If} $inst == ""
        MessageBox MB_OK "Please specify an option"
        Abort
    ${ElseIf} $inst == false
        ExecShell "open" "$EXEDIR\TechPubList_ForPC\$START_PUB"
        Abort    
    ${EndIf}
FunctionEnd

      

I need to add something to this last function after "Abort" which actually exits the installer.

Any help is appreciated! Thank!

+3


source to share


1 answer


Does the Quit statement do what you want it to do? The manual states:



Forces the installer to exit as soon as possible. After calling Quit, the installer exits (no callback functions can run).

+7


source







All Articles