Once installed the application using NSIS, To uninstall it from the Control Panel written the below script
Function un.onInit
    MessageBox MB_YESNO|MB_ICONEXCLAMATION "Are you sure you want to uninstall EMR?" /SD IDYES IDYES NoAbort
    Abort 
    NoAbort:
    SetAutoClose true
FunctionEnd
So that while uninstalling, first shows the pop-up message ("Are you sure you want to uninstall EMR?") When clicked on "OK", uninstallation completes.
And also to uninstall the installed software before installing it again, written the below script.
Function RemovePrevVerFunction
ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\EMR"  "UninstallString" 
 ${If} $R0 != ""
 MessageBox MB_OKCANCEL "EMR is already installed. Do you want to remove the previous version?" IDOK uninst
 Abort
 uninst:
 ExecWait "$INSTDIR\uninstall.exe"
 Quit
FunctionEnd
In the above script i have not used ExecWait "$INSTDIR\uninstall.exe /S", because I wanted to show the uninstallation process to the user.
But here how to hide the message "Are you sure you want to uninstall EMR?" that is popping up from un.onInit?
When uninstalling MSI, we are using "/qb" to hide the message. Like this is there any way to hide the message using NSIS?