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.68k stars 1.74k forks source link

Uninstall Confirm Dialog Option for One-click Windows NSIS #618

Closed dharders closed 8 years ago

dharders commented 8 years ago

Can we please add an option (or have it default behaviour) to have a simple "Are you sure you want to uninstall {{AppName}} ?" dialog popup when using the Add/Remove Programs feature of Windows ?

Motivation: Prevent unintentional data loss (from selecting the wrong program by mistake). Also it is standard Windows behaviour to have a confirmation dialog before uninstall.

develar commented 8 years ago
screen shot 2016-07-29 at 11 32 13

Windows 10 asks you about it. Is it not enough (I am not Windows user)?

dharders commented 8 years ago

Yes, that screenshot for Windows 10 is correct behaviour (I had only tested win 7 when posted the issue).

That's the 'new' Windows 10 "Add or remove programs" feature and that works as expected (I have since tested on Win 10). However, in Windows 10 there is also a "Change or remove a program" feature (God, bless them and their consistency!) and that is where the unexpected behaviour is happening (this is the Windows 7 way too, via Control Panel). To find the feature in Win10, just type 'change or remove' in the search bar (or find it in Control Panel) and hopefully you'll see the behaviour I'm describing.

(side-issue: if I click Uninstall while App is running, nothing happens...I assume exception is swallowed silently? Should we also prompt like install "Click OK to close running app..." ?)

dharders commented 8 years ago

I just tried your 5.22.1 release with your fix and the confirm dialog still does not popup for Win10 "Change or remove a program" and Win7. It still uninstalls without prompting.

Am I missing something?

develar commented 8 years ago

(side-issue: if I click Uninstall while App is running, nothing happens...I assume exception is swallowed silently? Should we also prompt like install "Click OK to close running app..." ?)

Fixed.

It still uninstalls without prompting.

Fixed.

Cause: SilentUnInstall equals to /S — but we need partial silent, so, granular SetSilent is used as a solution.

dharders commented 8 years ago

Awesome work!

I confirm that the fix in 5.23.1 is now working for both Win7 and Win10 (both uninstall variants)!

Perfect and thanks!

adicojo commented 7 years ago

Hello,

How can we skip the confirmation dialog <Are you sure you want to completely remove {AppName} and all of its components?> when the /S switch is used for a NSIS uninstallation? It prevents the uninstall from being unattended...

Thank you.

ismoil793 commented 8 months ago

Hi @adicojo, it has been a while, but anyway did you find how to skip that confirmation screen?