Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8937615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:26:45+00:00 2026-06-15T10:26:45+00:00

I have created EXE file using NSIS script.I have created custom page using following

  • 0

I have created EXE file using NSIS script.I have created custom page using following code,

page custom check

Function check
    ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\My app" "UninstallString"
    IfFileExists $R0 +1 NotInstalled
        call nsDialogpage

    NotInstalled:
FunctionEnd

Function nsDialogpage
     nsDialogs::Create 1018
     Pop $Dialog12
     ${If} $Dialog12 == error
         Abort
     ${EndIf}
     ${NSD_CreateRadioButton} 0 5u 100% 10u "Repair"
     Pop $Repair
     ${NSD_CreateRadioButton} 0 25u 100% 56u "Remove"
     Pop $Remove
     ${NSD_SetState} $Repair ${BST_CHECKED}
     ${NSD_GetState} $Repair $test
     --Do repair operation--
     ${NSD_OnClick} $Remove "Remove"
     nsDialogs::Show
     ${NSD_GetState} $Remove $RadioButton_State
     ${If} $RadioButton_State == ${BST_CHECKED}
         call Removed
     ${Else}
         Goto Done
     ${EndIf}
     Done:
FunctionEnd    

Function Remove
     nsDialogs::Create 1018
     Pop $Dialog12
     ${If} $Dialog12 == error
           Abort
     ${EndIf}
        --Do remove function--
      /* nsDialogs::Show*/
 FunctionEnd

If I run the above code it’s not working.No code executed after show function.If i give show function before functionEnd it throws me Run time exception.Because inside Remove function also have one more show().

My Requirement is,

If the user clicks the remove radio button,moves to next page and do the un install process and page comes to end.I have tried this scenario using above code.but its working fine.

How to include two custom pages in nsis installer?

Can anyone help me?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T10:26:46+00:00Added an answer on June 15, 2026 at 10:26 am

    You can add two custom pages in just the same way you are adding a custom page:

    Page custom check 
    Page custom Remove
    

    As Anders said, everything you put after nsDialogs::Show doesn’t get executed. You need to move this code to a new “leave” function:

    Var RemoveRequested
    Function RemoveCheck
        ${NSD_GetState} $Remove $RadioButton_State
        ${If} $RadioButton_State == ${BST_CHECKED}
            StrCpy $RemoveRequested "1"
        ${Else}
            StrCpy $RemoveRequested "0"
        ${EndIf}
    FunctioEnd
    

    You are saving the user selection in a global variable $RemoveRequested. Then, in the next custom page you can check this variable, and do anything you need, or just Abort and the second page will not be displayed.

    And then, you need to modify your custom pages declaration:

    Page custom check RemoveCheck
    Page custom Remove
    

    Now, check will be used to show the custom page, and when the user leaves the page (== clicks on “Next”), the function RemoveCheck will be executed.

    Your Remove function should check the flag we just created:

    Function Remove
        ${If} $RemoveRequested == "1"
            nsDialogs::Create 1018
            Pop $Dialog12
            ${If} $Dialog12 == error
                Abort
            ${EndIf}
            --Do remove function--
            /* nsDialogs::Show*/
        ${EndIf}
    FunctionEnd
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have successfully created exe file using NSIS.I have installed my application as windows
I have created an exe file as a part of pre build event. I
i have published my project and exe file has been created.... now i want
I have created an exe using exe4j (chose to create a service ) I
I have a JScript script that runs using cscript.exe . It creates a shortcut
I need to associate a file extension I have created .rulog with notepad.exe as
I know I can spawn new process using compiled exe file. Suppose I have
I am working on the WPF application and i have created an exe file.
I have created one windows application using VB. Whenever I executing the exe ,
I have written nsis script for my java project. I have successfully created a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.