Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 10 - NSIS one click install as Current User #564

Closed
FromStoneage opened this issue Jul 4, 2016 · 11 comments · May be fixed by qcif/data-curator#563
Closed

Windows 10 - NSIS one click install as Current User #564

FromStoneage opened this issue Jul 4, 2016 · 11 comments · May be fixed by qcif/data-curator#563

Comments

@FromStoneage
Copy link

  • 5.10.5:
  • nsis - windows: default to one click install

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 ?

@develar
Copy link
Member

develar commented Jul 5, 2016

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?

@FromStoneage
Copy link
Author

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 !

@FromStoneage
Copy link
Author

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

@develar
Copy link
Member

develar commented Jul 5, 2016

Why do you want to install for all users?

@FromStoneage
Copy link
Author

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

@develar
Copy link
Member

develar commented Jul 9, 2016

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

@develar
Copy link
Member

develar commented Jul 9, 2016

"Run as Administrator"

Must be in any case installed for current user (default settings). Bug. Will be fixed.

@develar
Copy link
Member

develar commented Jul 9, 2016

screen shot 2016-07-09 at 19 45 36

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.

develar added a commit to develar/electron-builder that referenced this issue Jul 9, 2016
@develar
Copy link
Member

develar commented Jul 9, 2016

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

@FromStoneage
Copy link
Author

@develar thanks for clarify and all your time on this issue ! I will give it a try tomorrow !

develar added a commit to develar/electron-builder that referenced this issue Jul 11, 2016
@develar
Copy link
Member

develar commented Jul 11, 2016

If you use NSIS installer, strongly recommended update to 5.12.1 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants