免互動安裝Microsoft .NET Runtime 10.0、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id Microsoft.DotNet.Runtime.10 -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Microsoft.DotNet.Runtime.10 -e --silentwinget uninstall --id Microsoft.DotNet.Runtime.10 -e --silent依安裝檔
64位元 · EXE(WiX Burn) · 所有使用者
靜默安裝
dotnet-runtime-10.0.15-win-x64.exe /quiet解除安裝
msiexec /x {E3860B64-C6F7-43B8-8809-CEE4AE78D57D} /qn /norestart- MSI產品代碼
- {E3860B64-C6F7-43B8-8809-CEE4AE78D57D}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{E3860B64-C6F7-43B8-8809-CEE4AE78D57D}
- DisplayVersion
- 10.0.15.36629
ARM64 · EXE(WiX Burn) · 所有使用者
靜默安裝
dotnet-runtime-10.0.15-win-arm64.exe /quiet解除安裝
msiexec /x {C13E2ABB-87BC-477B-BD93-8154EC16CBCD} /qn /norestart- MSI產品代碼
- {C13E2ABB-87BC-477B-BD93-8154EC16CBCD}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{C13E2ABB-87BC-477B-BD93-8154EC16CBCD}
- DisplayVersion
- 10.0.15.36629
32位元 · EXE(WiX Burn) · 所有使用者
靜默安裝
dotnet-runtime-10.0.15-win-x86.exe /quiet解除安裝
msiexec /x {585A5444-3F97-4E70-A4B7-F073BEB6A176} /qn /norestart- MSI產品代碼
- {585A5444-3F97-4E70-A4B7-F073BEB6A176}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{585A5444-3F97-4E70-A4B7-F073BEB6A176}
- DisplayVersion
- 10.0.15.36629
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-microsoft-net-runtime-10-0.ps1
$url = 'https://download.microsoft.com/download/ffd45c1d-8bfb-4336-b17b-9b4d099046f1/820034e4-4b5b-422a-80a6-8b3ffafbf58d/dotnet-runtime-10.0.15-win-x64.exe'
$sha256 = '59B0DA003D18B76E8DCC0DC05BF7E54A0E6E83E7C569D57E1EE5C270664BB128'
$file = Join-Path $env:TEMP 'dotnet-runtime-10.0.15-win-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-microsoft-net-runtime-10-0.ps1
$url = 'https://download.microsoft.com/download/ffd45c1d-8bfb-4336-b17b-9b4d099046f1/d5ce6fd1-95d5-4acd-adbb-406812706e50/dotnet-runtime-10.0.15-win-arm64.exe'
$sha256 = '07398DE5CC8EA84791B71C4EE80114E1F8A79B9A19AE1E63D60B2950FF8C4009'
$file = Join-Path $env:TEMP 'dotnet-runtime-10.0.15-win-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-microsoft-net-runtime-10-0.ps1
$url = 'https://download.microsoft.com/download/ffd45c1d-8bfb-4336-b17b-9b4d099046f1/bb62b9e4-3216-47a6-94d3-b62d680f53b2/dotnet-runtime-10.0.15-win-x86.exe'
$sha256 = '781E1D683D205F9016720BED788BE8DF2EA6C6DBEABCFE744713AE3421F98B17'
$file = Join-Path $env:TEMP 'dotnet-runtime-10.0.15-win-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