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
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.