Befehle, um AWS SAM Command Line Interface ohne Rückfragen zu installieren, wieder zu entfernen und in Verteilungswerkzeugen zu erkennen. Ein Befehl erscheint nur, wenn er feststeht: aus dem Manifest oder als dokumentierter Standard der jeweiligen Installer-Technik.
Passende Anleitung: Silent-Install-Parameter: MSI, NSIS, Inno Setup · Programm über Registry oder PowerShell deinstallieren
Mit winget
PowerShell
winget install --id Amazon.SAM-CLI -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Amazon.SAM-CLI -e --silentwinget uninstall --id Amazon.SAM-CLI -e --silentNach Installer
64-Bit · MSI · Alle Benutzer
Stille Installation
msiexec /i AWS_SAM_CLI_64_PY3.msi /qn /norestartProtokoll schreiben
msiexec /i AWS_SAM_CLI_64_PY3.msi /qn /norestart /l*v "%TEMP%\aws-sam-command-line-interface-install.log"Deinstallation
msiexec /x {C009020D-5810-4BB7-B843-013ED33BB5EF} /qn /norestart- MSI-Produktcode
- {C009020D-5810-4BB7-B843-013ED33BB5EF}
- Deinstallationsschlüssel in der Registry
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{C009020D-5810-4BB7-B843-013ED33BB5EF}
- UpgradeCode
- {869D7B3B-A7C9-4E19-AC94-190305391ED1}
- Installationsordner
- %ProgramFiles%/Amazon/AWSSAMCLI
PowerShell: herunterladen, prüfen, installieren
Lädt die offizielle Datei herunter, prüft den SHA256-Hash und installiert still.
install-aws-sam-command-line-interface.ps1
$url = 'https://github.com/aws/aws-sam-cli/releases/download/v1.170.0/AWS_SAM_CLI_64_PY3.msi'
$sha256 = 'C7C4E930CCBC17194C3B9E36E506A846ACFE0856F0CCC2561BD6E693BFEB4E4E'
$file = Join-Path $env:TEMP 'AWS_SAM_CLI_64_PY3.msi'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process msiexec.exe -ArgumentList '/i', ('"{0}"' -f $file), '/qn', '/norestart' -Wait