aws-cli
aws-cli copied to clipboard
The installer should be able to install without administrative privileges on Windows
Our corporate environment does not give users admin rights on their computers. This installer should be able to install without requiring an administrator.
Hi, agreed @RobCannon. Also see #4789, opened after this one.
Any idea if and when this will be finished? It is really painful for corporate users.
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
Thanks @willsheldon ! this worked.
@willsheldon
msiexec /a %USERPROFILE%/Downloads/AWSCLIV2.msi /qb TARGETDIR=%USERPROFILE%\awscli
Oh, right, windows uses backslash:
msiexec /a %USERPROFILE%\Downloads\AWSCLIV2.msi /qb TARGETDIR=%USERPROFILE%\awscli
Gotta love having to edit your PATH to get this working simply because AWS refused to do a pip release. 👎
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's workaround, telling the installer to use a target dir in the user's home dir, works around the issue for me. Thanks!
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
Unfortunately, the workaround doesn't let you just "winget install Amazon.AWSCLI" without needed admin. This really needs to be fixed in the installer.
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"
Again, just put it in pip already. This is unnecessarily difficult.
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
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.
Wow.. this is almost ... 4? years old, now?
Wow, still not fixed, and let some other project take the pip awcliv2 package and get it working... https://pypi.org/project/awscliv2/
Still... causing issues for us as clients often work in locked down corporate environments without admin permissions.
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.
Wow.. this is almost ... 4? years old, now?
now it is 5 years