When installing the nsis .exe under Windows 7, one click will install for all users. However when installing under Windows 10 environment, regardless (UAC - User Access Control settings) it only install under "Current User". The work around is to run the installer as "Run as Administrator".
Question, is there anyway to avoid right click > "Run as Administrator" to install the app for all User ?
When installing the nsis .exe under Windows 7, one click will install for all users.
It is bug.
is there anyway to avoid right click > "Run as Administrator" to install the app for all User ?
You can disable one-click installer (set oneClick to false) and set perMachine to false. See https://github.com/electron-userland/electron-builder/wiki/Options#buildnsis
Do you want one-click installer that installs for all users?
Thanks @develar yes those flag fixes my issue. No I don't need a one-click installer that installers for all user, as long as there is a mechanism to install for all Users it's a good solution !
@develar sorry for closing it earlier. I just tried the flag you mentioned. It does prompt user to choose to install between "Anyone who uses this computer (all users)" and "Only for me (current.user)"
However, when running the installer under Windows 10, without "Run as Administrator" the installer doesn't proceed pass the first prompt and crashes.
Why do you want to install for all users?
@develar good question, one of the reason is I'm trying to associate a file extension to the electron app. If the app is not installed for all users, the app will not be installed under C:\Program Files. As a result if the file extension is not associated with the app, open a file with unknown extension will prompt user to choose from a list of pre-installed apps, this list will _not_ contain the custom app. Further more, when browse for other apps to open, by default Windows will load an Open with .. dialog that defaults to C:\Program Files.
That's why I'd be interested to deploy the app for All user instead of current user.
@FromStoneage Thanks for clear explanation. I will check and support per-machine installation.
When installing the nsis .exe under Windows 7, one click will install for all users.
Cannot reproduce.
"Run as Administrator"
Must be in any case installed for current user (default settings). Bug. Will be fixed.

One-click per machine installer will not elevate during install — instead, RequestExecutionLevel will be set to admin. Boring installer allows to choose install mode, so, it makes sense to elevate during install. But no sense for one-click.
@FromStoneage 5.12.0 — you can now just set perMachine to false and you will get one-click installer per all users. Exactly as you want. Thanks again for clear explanation.
Issue is not yet closed because boring-installer crashed if per all users selected.
Please note — regardless of user state (admin or not), app will be executed from user normal user (I mean "run after install"), not from admin.
@develar thanks for clarify and all your time on this issue ! I will give it a try tomorrow !
If you use NSIS installer, strongly recommended update to 5.12.1 version.
Most helpful comment
@develar good question, one of the reason is I'm trying to associate a file extension to the electron app. If the app is not installed for all users, the app will not be installed under
C:\Program Files. As a result if the file extension is not associated with the app, open a file with unknown extension will prompt user to choose from a list of pre-installed apps, this list will _not_ contain the custom app. Further more, when browse for other apps to open, by default Windows will load an Open with .. dialog that defaults toC:\Program Files.That's why I'd be interested to deploy the app for All user instead of current user.