electron-userland / electron-builder

A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box
https://www.electron.build
MIT License
13.46k stars 1.71k forks source link

"one-click installer executes uninstall section in the silent mode" causes all MessageBox with /SD flag to go silent even if user didn't run uninstaller with /S flag? #8240

Open Agritite opened 1 month ago

Agritite commented 1 month ago

So it seems like due to here: https://github.com/electron-userland/electron-builder/blob/278a3df3c738dbe0d2240f338e901774b7d578c5/packages/app-builder-lib/templates/nsis/uninstaller.nsh#L15-L20

all calls to MessageBox with /SD flag in the customUnInit and customUninstall macro would go into silent mode regardless of whether the user actually runs the uninstaller with the /S flag?

This is not ideal, because we have a messagebox to confirm reboot if RMDir /REBOOTOK is required. We definitely do not want to reboot without user's consent. Any other options? or is manually calling ${GetOptions} "/S" the only way?