Reputation: 331
Currently creating an uninstaller for my app. The uninstaller doesn't show any confirmation message before uninstalling. Is there a way to prompt the user for confirmation (I'm hoping for a default message or something so it can be localized easily, instead of having to create localization files for just that) ?
Upvotes: 0
Views: 621
Reputation: 434
Two possible solutions:
1) Using standard NSIS pages
Prompt the user in uninstaller init function
function un.onInit
...
#Verify the uninstaller - last chance to back out
MessageBox MB_OKCANCEL "Permanantly remove ${APPNAME}?" IDOK next
Abort
...
functionEnd
Example can be found here
2) Using Modern User Interface (MUI)
Set uninstaller confirmation page
!insertmacro MUI_UNPAGE_CONFIRM
Example can be found here
Upvotes: 2