Search code examples
node.jsreactjselectronnsiselectron-builder

Electron nsis-web installer uninstalls existing app while installing update


We are facing an issue in Electron app, wherein the existing app is getting deleted while trying to install a new version (a similar kind of issue, (#2381). In our case, it's not just links in the start menu but seems the entire app itself is getting uninstalled, as we see the app folder (C:\Users\AppData\Local\Programs) itself is getting emptied during installation. So, we need to install it twice every time (as a temporary workaround).

App Details:

Electron Builder Version: v22.14.13

Electron Version: 17.0.0

node: 14.16.0

Operating System: Windows

I am not sure what is wrong.

Build Config :

enter image description here


Solution

  • I was able to find the reason. The issue was due to both productName and artifactName are same in the build config. Changing (OR adding a suffix to) the artifactName, has fixed the issue.

    Note: I'm not sure whether it should work fine even if both productName and artifcatName are same, but in our case, it caused an issue.

    New Build Config in my project as follows:

    enter image description here