Microsoft .NET Runtime 9.0を確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id Microsoft.DotNet.Runtime.9 -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Microsoft.DotNet.Runtime.9 -e --silentwinget uninstall --id Microsoft.DotNet.Runtime.9 -e --silentインストーラー別
64ビット · EXE(WiX Burn) · すべてのユーザー
サイレントインストール
dotnet-runtime-9.0.22-win-x64.exe /quietアンインストール
msiexec /x {82588CAC-50D6-47DF-A52A-FB36A4446C49} /qn /norestart- MSIプロダクトコード
- {82588cac-50d6-47df-a52a-fb36a4446c49}
- アンインストール用レジストリキー
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{82588cac-50d6-47df-a52a-fb36a4446c49}
- DisplayVersion
- 9.0.22.36622
ARM64 · EXE(WiX Burn) · すべてのユーザー
サイレントインストール
dotnet-runtime-9.0.22-win-arm64.exe /quietアンインストール
msiexec /x {65973860-C4C9-45E7-89C2-44E06F8F5BAE} /qn /norestart- MSIプロダクトコード
- {65973860-c4c9-45e7-89c2-44e06f8f5bae}
- アンインストール用レジストリキー
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{65973860-c4c9-45e7-89c2-44e06f8f5bae}
- DisplayVersion
- 9.0.22.36622
32ビット · EXE(WiX Burn) · すべてのユーザー
サイレントインストール
dotnet-runtime-9.0.22-win-x86.exe /quietアンインストール
msiexec /x {1C34F72B-77D5-4ED5-AF7D-6B22CB81147E} /qn /norestart- MSIプロダクトコード
- {1c34f72b-77d5-4ed5-af7d-6b22cb81147e}
- アンインストール用レジストリキー
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{1c34f72b-77d5-4ed5-af7d-6b22cb81147e}
- DisplayVersion
- 9.0.22.36622
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-microsoft-net-runtime-9-0.ps1
$url = 'https://download.microsoft.com/download/cbe1e657-901f-43fe-a473-1274af93b694/f76afc7a-1ebd-4b9b-beb9-92d0b872b5d8/dotnet-runtime-9.0.22-win-x64.exe'
$sha256 = 'C0327DAF307C18F23515735BAE8A1C2EE3881B317F6DD1AAAE867B852B8235A6'
$file = Join-Path $env:TEMP 'dotnet-runtime-9.0.22-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-9-0.ps1
$url = 'https://download.microsoft.com/download/cbe1e657-901f-43fe-a473-1274af93b694/b2e3f54a-3244-4547-b545-c0b20ad07c2a/dotnet-runtime-9.0.22-win-arm64.exe'
$sha256 = '466564277BEE05977F5162161762D15F4F81158DF8C9A858AE0C84A2FBDCF05A'
$file = Join-Path $env:TEMP 'dotnet-runtime-9.0.22-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-9-0.ps1
$url = 'https://download.microsoft.com/download/cbe1e657-901f-43fe-a473-1274af93b694/17ce3ff9-537d-4f65-b60a-5a43af39ca9f/dotnet-runtime-9.0.22-win-x86.exe'
$sha256 = 'E38CA2CFC29915D2845DBCE54FBC04F40133F0A451C3C1115D9A333415D0983C'
$file = Join-Path $env:TEMP 'dotnet-runtime-9.0.22-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