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.