Ordres per instal·lar Microsoft .NET Framework Runtime 4.8.1 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
PowerShell
winget install --id Microsoft.DotNet.Framework.Runtime -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Microsoft.DotNet.Framework.Runtime -e --silentwinget uninstall --id Microsoft.DotNet.Framework.Runtime -e --silentPer instal·lador
64 bits · EXE
Instal·lació silenciosa
NDP481-x86-x64-AllOS-ENU.exe /passive /AcceptEULA /norestartARM64 · EXE
Instal·lació silenciosa
NDP481-x86-x64-AllOS-ENU.exe /passive /AcceptEULA /norestart32 bits · EXE
Instal·lació silenciosa
NDP481-x86-x64-AllOS-ENU.exe /passive /AcceptEULA /norestartQualsevol processador · EXE
Instal·lació silenciosa
NDP481-x86-x64-AllOS-ENU.exe /passive /AcceptEULA /norestartPowerShell: baixar, verificar, instal·lar
Baixa el fitxer oficial, en comprova l’SHA256 i l’instal·la en mode silenciós.
install-microsoft-net-framework-runtime-4-8-1.ps1
$url = 'https://download.microsoft.com/download/4/b/2/cd00d4ed-ebdd-49ee-8a33-eabc3d1030e3/NDP481-x86-x64-AllOS-ENU.exe'
$sha256 = 'C0CA2E0C9CD18A24A0A77369A13FAE2C2C4E8BC83355DD24E5DDC00F9D791FE3'
$file = Join-Path $env:TEMP 'NDP481-x86-x64-AllOS-ENU.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 '/passive /AcceptEULA /norestart' -Wait install-microsoft-net-framework-runtime-4-8-1.ps1
$url = 'https://download.microsoft.com/download/4/b/2/cd00d4ed-ebdd-49ee-8a33-eabc3d1030e3/NDP481-x86-x64-AllOS-ENU.exe'
$sha256 = 'C0CA2E0C9CD18A24A0A77369A13FAE2C2C4E8BC83355DD24E5DDC00F9D791FE3'
$file = Join-Path $env:TEMP 'NDP481-x86-x64-AllOS-ENU.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 '/passive /AcceptEULA /norestart' -Wait install-microsoft-net-framework-runtime-4-8-1.ps1
$url = 'https://download.microsoft.com/download/4/b/2/cd00d4ed-ebdd-49ee-8a33-eabc3d1030e3/NDP481-x86-x64-AllOS-ENU.exe'
$sha256 = 'C0CA2E0C9CD18A24A0A77369A13FAE2C2C4E8BC83355DD24E5DDC00F9D791FE3'
$file = Join-Path $env:TEMP 'NDP481-x86-x64-AllOS-ENU.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 '/passive /AcceptEULA /norestart' -Wait install-microsoft-net-framework-runtime-4-8-1.ps1
$url = 'https://download.microsoft.com/download/4/b/2/cd00d4ed-ebdd-49ee-8a33-eabc3d1030e3/NDP481-x86-x64-AllOS-ENU.exe'
$sha256 = 'C0CA2E0C9CD18A24A0A77369A13FAE2C2C4E8BC83355DD24E5DDC00F9D791FE3'
$file = Join-Path $env:TEMP 'NDP481-x86-x64-AllOS-ENU.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 '/passive /AcceptEULA /norestart' -Wait