Microsoft .NET Native Runtimeを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id Microsoft.DotNet.Native.Runtime -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Microsoft.DotNet.Native.Runtime -e --silentwinget uninstall --id Microsoft.DotNet.Native.Runtime -e --silentインストーラー別
64ビット · ZIP
サイレントインストール
Add-AppxPackage -Path Dependencies.zipアンインストール
Get-AppxPackage -Name Microsoft.NET.Native.Runtime.2.2 | Remove-AppxPackageARM64 · ZIP
サイレントインストール
Add-AppxPackage -Path Dependencies.zipアンインストール
Get-AppxPackage -Name Microsoft.NET.Native.Runtime.2.2 | Remove-AppxPackage32ビット · ZIP
サイレントインストール
Add-AppxPackage -Path Dependencies.zipアンインストール
Get-AppxPackage -Name Microsoft.NET.Native.Runtime.2.2 | Remove-AppxPackagePowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-microsoft-net-native-runtime.ps1
$url = 'https://github.com/microsoft/busiotools/releases/download/v2.8.0/Dependencies.zip'
$sha256 = '91B666A399CBA3E6D3A6816C80B0422D4BCDAB2A7FBE6F19E6D080B63BDC637F'
$file = Join-Path $env:TEMP 'Dependencies.zip'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Add-AppxPackage -Path $file install-microsoft-net-native-runtime.ps1
$url = 'https://github.com/microsoft/busiotools/releases/download/v2.8.0/Dependencies.zip'
$sha256 = '91B666A399CBA3E6D3A6816C80B0422D4BCDAB2A7FBE6F19E6D080B63BDC637F'
$file = Join-Path $env:TEMP 'Dependencies.zip'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Add-AppxPackage -Path $file install-microsoft-net-native-runtime.ps1
$url = 'https://github.com/microsoft/busiotools/releases/download/v2.8.0/Dependencies.zip'
$sha256 = '91B666A399CBA3E6D3A6816C80B0422D4BCDAB2A7FBE6F19E6D080B63BDC637F'
$file = Join-Path $env:TEMP 'Dependencies.zip'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Add-AppxPackage -Path $file