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.55k stars 1.73k forks source link

Cannot overwrite installation if the uninstaller.exe is present, have to delete it manually #8340

Open KyleRicardo opened 1 month ago

KyleRicardo commented 1 month ago

I'm using the latest (next) version of electron-builder to do the test.

I'm using allusers mode to do the installation, when the app is not installed, then the installer runs perfectly without any problem. But when I test the overwrite installation (for the purpose of upgrading my app), it throw the Error XXX Application cannot be closed. Please close it manually and click Retry to continue. I don't think this error message is accurate, because I have not started my app even once. And of course the Retry button cannot solve the problem.

But when I delete the whole %ProgramFiles%\MyApp folder, then the overwrite re-installation can go smoothly. After deeper dig, I found that removing only the Uninstall MyApp.exe can also do the job.

So I wonder what does the installer check before installation, why the presence of the uninstaller.exe prevents the installer do its job. This is not the behavior I expect.

beyondkmp commented 1 month ago

@KyleRicardo Can you provide a minimal reproducible version of the code?

KyleRicardo commented 1 month ago

Thanks, I'll see what I can do.