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

Provide non-admin mode from the Windows installer #1740

Open
cosmicice0 opened this issue Sep 17, 2020 · 19 comments
Open

Provide non-admin mode from the Windows installer #1740

cosmicice0 opened this issue Sep 17, 2020 · 19 comments
Labels
enhancement a request to improve CLI help wanted Contributions welcome packaging windows

Comments

@cosmicice0
Copy link

Hey there,

I'm trying to install github cli, but it seems like it needs admin privileges on windows. Is there a way to get a non-admin installer or a portable version?

Thanks!

@cosmicice0 cosmicice0 added the enhancement a request to improve CLI label Sep 17, 2020
@cosmicice0
Copy link
Author

Sorry, I just found out that there's a zip release in the releases page. Thanks :)

@mislav
Copy link
Contributor

mislav commented Sep 17, 2020

Thanks for letting us know! In the future, we might try to allow a non-admin install.

Protip: you can also install over package managers such as Chocolatey or Scoop 👍

@l3ender
Copy link

l3ender commented Sep 18, 2020

It would be nice if the zip install were mentioned in the install notes and linked to from the download page. For those in an enterprise environment, admin privileges or package managers are usually not options.

@leonard84
Copy link

IMHO, the installer should ask whether to install for all users (admin) or only for current user (appdata local).

@mislav
Copy link
Contributor

mislav commented Oct 16, 2020

Thanks for the additional context; reopening this as a feature request to tweak the Windows installer. 👍

@mislav mislav reopened this Oct 16, 2020
@mislav mislav changed the title Non admin version Provide non-admin mode from the Windows installer Oct 16, 2020
@vilmibm vilmibm added the help wanted Contributions welcome label Oct 22, 2020
@just1a-person
Copy link
Contributor

IMHO, the installer should ask whether to install for all users (admin) or only for current user (appdata local).

This shouldn't affect winget

@mislav
Copy link
Contributor

mislav commented Dec 10, 2020

@itsme-alan Could you elaborate?

@just1a-person
Copy link
Contributor

@itsme-alan Could you elaborate?

winget users expect a silent installation. Ideally there should be a command-line argument for the msi to specify installation for all users or for the current user.

@mislav
Copy link
Contributor

mislav commented Dec 10, 2020

@itsme-alan That's a good point. I'm not familiar with how tools like Winget or Chocolatey run an MSI installer from a script. MSIs in graphical mode can ask the user to select an installation directory, for example. Does a headless run of an MSI just pick all the default options? Would a default option also be picked for user vs. admin install?

@leonard84
Copy link

@mislav

Does a headless run of an MSI just pick all the default options? Would a default option also be picked for user vs. admin install?

Normally you provide the switches in the install file, e.g., this manifest of 7zip for winget.
https://github.com/microsoft/winget-pkgs/blob/7d16c13710799937c94b663fb9adc6d23cbfd0e7/manifests/7Zip/7Zip/16.0.4.yaml

So it makes sense to provide a switch to target either all users or only the current user. If you can't decide on a reasonable default it is also acceptable to make it a required switch and fail if it started in non-interactive mode without the switch for the target.

@just1a-person
Copy link
Contributor

You can pass arguments to the installer directly using winget cli.

@mislav mislav mentioned this issue May 27, 2021
18 tasks
@bl-ue
Copy link

bl-ue commented May 27, 2021

Wow, there are a lot of 🚀s on the issue. 🤔

@cprima
Copy link

cprima commented Jan 15, 2022

+1 for an easy way to get Git on the commandline in a restricted corporate environment. i.e. %APPDATA%.

There are thousands of developers who only understand Git by using a "3rd party GUI interface". As a result they are lacking some fundamental understandings of how Git works. Git commands get LOCALIZED in these GUIs!?!

With a solid way to install a CLI client one could start writing tutorials.

@JM-AlanSmith
Copy link

+1 for this too. Especially as the git-scm cli is there, as is Visual Studio Code and Python!

@mislav
Copy link
Contributor

mislav commented Feb 2, 2022

I've found some Wix documentation that sounds like it might address making a single MSI that covers both per-machine and per-user installation, but I have no experience with this. If someone wants to take a stab, our current Wix setup is here https://github.com/cli/cli/blob/trunk/build/windows/gh.wxs

@byjrack
Copy link

byjrack commented Mar 9, 2023

yup for winget it should align w the https://learn.microsoft.com/en-us/windows/package-manager/winget/settings#scope setting.

@byjrack
Copy link

byjrack commented Nov 28, 2023

Ironically came up again today and finally looked at the wix. Not only is it hard coded to Program Files which you can override with INSTALLDIR, but then it assumes it can write to HKLM so needs admin even if the install path isn't protected. May need to dust off my wix skills and see if I can make a control script that handles the User vs machine wide (+UI) and then still persist to the proper registry location.

@RobCannon
Copy link

It would be great if this could be fixed since the default way most Windows users are going to install this is via winget.

@RYRY1002
Copy link

RYRY1002 commented May 3, 2024

+1 also.

Downloading the .zip, extracting it and putting it in a folder with PATH access is a pain as opposed to typing in a command in winget. This is especially frustrating considering that the .zip essentially contains a single file, gh.exe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement a request to improve CLI help wanted Contributions welcome packaging windows
Projects
None yet
Development

No branches or pull requests