aws-cli icon indicating copy to clipboard operation
aws-cli copied to clipboard

The installer should be able to install without administrative privileges on Windows

Open RobCannon opened this issue 5 years ago • 20 comments

Our corporate environment does not give users admin rights on their computers. This installer should be able to install without requiring an administrator.

RobCannon avatar Nov 08 '19 15:11 RobCannon

Hi, agreed @RobCannon. Also see #4789, opened after this one.

kdaily avatar Oct 07 '20 17:10 kdaily

Any idea if and when this will be finished? It is really painful for corporate users.

timschoeneberg avatar Jan 06 '21 08:01 timschoeneberg

Workaround as found here

download the .msi file from Amazon website: https://awscli.amazonaws.com/AWSCLIV2.msi use msiexec in command line to extract application from msi package: msiexec /a %USERPROFILE%/Downloads/AWSCLIV2.msi /qb TARGETDIR=%USERPROFILE%\awscli Now you can use awscli version 2 using the following command:

>%USERPROFILE%\awscliv2\Amazon\AWSCLIV2\aws --version
aws-cli/2.1.39 Python/3.8.8 Windows/10 exe/AMD64 prompt/off

willsheldon avatar Jun 25 '21 15:06 willsheldon

Thanks @willsheldon ! this worked.

sanjib-basu avatar Jul 06 '21 19:07 sanjib-basu

@willsheldon msiexec /a %USERPROFILE%/Downloads/AWSCLIV2.msi /qb TARGETDIR=%USERPROFILE%\awscli image

bjethwan avatar Aug 06 '21 15:08 bjethwan

Oh, right, windows uses backslash: msiexec /a %USERPROFILE%\Downloads\AWSCLIV2.msi /qb TARGETDIR=%USERPROFILE%\awscli

willsheldon avatar Aug 06 '21 15:08 willsheldon

Gotta love having to edit your PATH to get this working simply because AWS refused to do a pip release. 👎

dan-petty avatar Sep 21 '21 15:09 dan-petty

Single command installation workaround:

msiexec /a https://awscli.amazonaws.com/AWSCLIV2.msi /qb TARGETDIR=%USERPROFILE%\awscli

Then run it without touching environment variable:

doskey aws=%USERPROFILE%\awscli\Amazon\AWSCLIV2\aws.exe $* 
aws --version

fdaugan avatar Feb 24 '22 15:02 fdaugan

@fdaugan's workaround, telling the installer to use a target dir in the user's home dir, works around the issue for me. Thanks!

timblaktu avatar Mar 22 '22 16:03 timblaktu

Thanks @willsheldon for sharing this workaround...Very much useful and it's working in windows without admin privileges :)

There was a minor typo error in second command, which i updated. We are extracting the application to folder 'awscli' using command 1, but referencing 'AWSCLIV2' folder in the second command, which causes error.

Command 1: msiexec /a %USERPROFILE%\Downloads\AWSCLIV2.msi /qb TARGETDIR=%USERPROFILE%\awscli

command 2: %USERPROFILE%\awscli\Amazon\AWSCLIV2\aws --version

veeramaninatarajanmca avatar Jul 29 '22 08:07 veeramaninatarajanmca

Unfortunately, the workaround doesn't let you just "winget install Amazon.AWSCLI" without needed admin. This really needs to be fixed in the installer.

RobCannon avatar Jul 29 '22 13:07 RobCannon

Instead of running command:2 again and again (which is a bit lengthy), set the env path in windows using...

setx PATH ^%PATH^%;"C:\Users<<your_username>>\awscli\Amazon\AWSCLIV2"

lakshayarora476 avatar Dec 05 '22 11:12 lakshayarora476

Again, just put it in pip already. This is unnecessarily difficult.

dan-petty avatar Feb 26 '23 18:02 dan-petty

that could be nice to add the pip command to the aws doc https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html

x0rld avatar Mar 20 '23 09:03 x0rld

Unfortunately, the workaround doesn't let you just "winget install Amazon.AWSCLI" without needed admin. This really needs to be fixed in the installer.

This is the correct solution. All winget packages should default to 'install without admin if that is possible'. That is both the more secure fashion and would encourage additional adoption of winget.

blakeduffey avatar Mar 24 '23 16:03 blakeduffey

Wow.. this is almost ... 4? years old, now?

jnorment-alight avatar Apr 06 '23 18:04 jnorment-alight

Wow, still not fixed, and let some other project take the pip awcliv2 package and get it working... https://pypi.org/project/awscliv2/

dan-petty avatar May 08 '23 13:05 dan-petty

Still... causing issues for us as clients often work in locked down corporate environments without admin permissions.

PeterBaker0 avatar Jul 05 '23 03:07 PeterBaker0

So what are you guys doing instead? You just have someone RDP to their computer and update it for them every time? This is absurd.

Huntbiss5 avatar Mar 11 '24 17:03 Huntbiss5

Wow.. this is almost ... 4? years old, now?

now it is 5 years

MarcoXM avatar Apr 11 '24 19:04 MarcoXM