Ordres per instal·lar Windows App Development CLI sense preguntes, desinstal·lar-lo i detectar-lo des d’eines de desplegament. Només es mostra una ordre quan és segura: la que indica el manifest o el valor per defecte documentat de la tecnologia de l’instal·lador.
Guia relacionada: Instal·lació silenciosa: MSI, NSIS, Inno Setup · Desinstal·lar un programa amb el registre o PowerShell
Amb winget
winget install --id Microsoft.WinAppCli -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Microsoft.WinAppCli -e --silentwinget uninstall --id Microsoft.WinAppCli -e --silentPer instal·lador
64 bits · MSIX
Add-AppxPackage -Path winappcli_x64.msixGet-AppxPackage -Name winapp | Remove-AppxPackage64 bits · ZIP
No cal instal·lar-lo (portable)
ARM64 · MSIX
Add-AppxPackage -Path winappcli_arm64.msixGet-AppxPackage -Name winapp | Remove-AppxPackageARM64 · ZIP
No cal instal·lar-lo (portable)
PowerShell: baixar, verificar, instal·lar
Baixa el fitxer oficial, en comprova l’SHA256 i l’instal·la en mode silenciós.
$url = 'https://github.com/microsoft/winappcli/releases/download/v0.7.1/winappcli_x64.msix'
$sha256 = '6B7310C80EBD8DAE5B51CD84A23CCF6001381DB28AE7B49472FC6A54255F7310'
$file = Join-Path $env:TEMP 'winappcli_x64.msix'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Add-AppxPackage -Path $file $url = 'https://github.com/microsoft/winappcli/releases/download/v0.7.1/winappcli_arm64.msix'
$sha256 = '07B37A0F7A6DE0816BBB0C888711F0AACCECBAF92A3DAE6E45024CA944AD8B93'
$file = Join-Path $env:TEMP 'winappcli_arm64.msix'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Add-AppxPackage -Path $file