Two electron applications installed but same desktop shortcut

12 views Asked by At

I have two electron applications built with electron-builder. I'm on Windows 11 running "electron-builder": "^24.13.3".

I install locally Application1 for all users. Everything is ok and a shortcut on the desktop is created.

Then I install Application2 for all users. But the existing shortcut (from Application1 installation) is changed to the shortcut for Application2 and the Application1 now does not have a shortcut anymore.

During the second installation the installer say that "There is already a per-machine installation. Will reinstall/upgrade". OK, this explain the problem, but I have set to false the perMachine nsis option. Or maybe I completely misunderstood the oneClick and perMachine settings.

What should I do to made possible two independent installations?

The two applications go to different directories under C:\Program Files. Their electron-builder.yaml files are equal with only the productName: Application1 different between the two.

---
"$schema": https://raw.githubusercontent.com/electron-userland/electron-builder/master/packages/app-builder-lib/scheme.json
appId: com.electron.{productName}
productName: Application1
copyright: Copyright © 2024 ${author}
asar: true
directories:
  output: release/${version}
  buildResources: resources
files:
  - dist-electron
  - dist
electronLanguages:
  - en-US
  - it
win:
  target:
  - target: nsis
    arch:
    - x64
  artifactName: ${productName}-${version}-setup.${ext}
nsis:
  oneClick: false
  perMachine: false
  allowToChangeInstallationDirectory: true
  deleteAppDataOnUninstall: false
  shortcutName: ${productName}
  uninstallDisplayName: ${productName}
  createDesktopShortcut: always
0

There are 0 answers