Electron create MSI installer using electron-builder

后端 未结 5 1579
无人及你
无人及你 2021-02-13 00:24

I managed to create an .exe installer for windows using electron builder, I create 2 package.json as pointed out in the docs :

https://github.com/electron-userland/elec

5条回答
  •  长情又很酷
    2021-02-13 00:40

    You don't actually need an MSI installed to get your app installed into Program Files.

    If you disable one click in the nsis config (oneClick), the user is prompted whether to do the single user install (in AppData) or per machine (in Program Files).

    If you don't want to give them the choice, you can set perMachine to false which will only allow install into Program Files:

    "nsis": {
      "oneClick": false,
      "perMachine": false
    },
    

    I would personally leave them the option as they can still install without admin rights!

    In the latest version of electron-builder there is also a allowToChangeInstallationDirectory option which allows the user to choose any install location.

提交回复
热议问题