免互動安裝Windows App SDK、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id Microsoft.WindowsAppRuntime.1.1 -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Microsoft.WindowsAppRuntime.1.1 -e --silentwinget uninstall --id Microsoft.WindowsAppRuntime.1.1 -e --silent依安裝檔
64位元 · EXE
靜默安裝
windowsappruntimeinstall-x64.exe --quietARM64 · EXE
靜默安裝
windowsappruntimeinstall-arm64.exe --quiet32位元 · EXE
靜默安裝
windowsappruntimeinstall-x86.exe --quietPowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-windows-app-sdk.ps1
$url = 'https://aka.ms/windowsappsdk/1.1/1.1.5/windowsappruntimeinstall-x64.exe'
$sha256 = 'FAAFB4D522F83D581046D869D80BEF0F91B157470FFD8F5524066BB6F6052AF8'
$file = Join-Path $env:TEMP 'windowsappruntimeinstall-x64.exe'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '--quiet' -Wait install-windows-app-sdk.ps1
$url = 'https://aka.ms/windowsappsdk/1.1/1.1.5/windowsappruntimeinstall-arm64.exe'
$sha256 = '7A3D91990AE235882265F8763C6BB7C80B30A7050DF083EF21CE5820031026B9'
$file = Join-Path $env:TEMP 'windowsappruntimeinstall-arm64.exe'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '--quiet' -Wait install-windows-app-sdk.ps1
$url = 'https://aka.ms/windowsappsdk/1.1/1.1.5/windowsappruntimeinstall-x86.exe'
$sha256 = '815663F588A4C928B976A78C19389427F83D87770F1527CD742058CC34CFEF29'
$file = Join-Path $env:TEMP 'windowsappruntimeinstall-x86.exe'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '--quiet' -Wait