Ordres per instal·lar Microsoft Visual C++ Runtime Package (UWP Desktop Bridge) 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.VCLibs.12 -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Microsoft.VCLibs.12 -e --silentwinget uninstall --id Microsoft.VCLibs.12 -e --silentPer instal·lador
64 bits · ZIP
Instal·lació silenciosa
Add-AppxPackage -Path vclibs_redist_packages.zipDesinstal·lar
Get-AppxPackage -Name Microsoft.VCLibs.120.00 | Remove-AppxPackage32 bits · ZIP
Instal·lació silenciosa
Add-AppxPackage -Path vclibs_redist_packages.zipDesinstal·lar
Get-AppxPackage -Name Microsoft.VCLibs.120.00 | Remove-AppxPackageARM · ZIP
Instal·lació silenciosa
Add-AppxPackage -Path vclibs_redist_packages.zipDesinstal·lar
Get-AppxPackage -Name Microsoft.VCLibs.120.00 | Remove-AppxPackagePowerShell: baixar, verificar, instal·lar
Baixa el fitxer oficial, en comprova l’SHA256 i l’instal·la en mode silenciós.
install-microsoft-visual-c-plus-plus-runtime-package-uwp-desktop-bridge.ps1
$url = 'https://download.microsoft.com/download/5/f/0/5f0f8404-9329-44a9-8176-ed6f7f746f25/vclibs_redist_packages.zip'
$sha256 = 'BB758B8BB0B0042281561AC07CA4984092DA66E58FEBFEF8B57AB85DE8B8D24E'
$file = Join-Path $env:TEMP 'vclibs_redist_packages.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-visual-c-plus-plus-runtime-package-uwp-desktop-bridge.ps1
$url = 'https://download.microsoft.com/download/5/f/0/5f0f8404-9329-44a9-8176-ed6f7f746f25/vclibs_redist_packages.zip'
$sha256 = 'BB758B8BB0B0042281561AC07CA4984092DA66E58FEBFEF8B57AB85DE8B8D24E'
$file = Join-Path $env:TEMP 'vclibs_redist_packages.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-visual-c-plus-plus-runtime-package-uwp-desktop-bridge.ps1
$url = 'https://download.microsoft.com/download/5/f/0/5f0f8404-9329-44a9-8176-ed6f7f746f25/vclibs_redist_packages.zip'
$sha256 = 'BB758B8BB0B0042281561AC07CA4984092DA66E58FEBFEF8B57AB85DE8B8D24E'
$file = Join-Path $env:TEMP 'vclibs_redist_packages.zip'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Add-AppxPackage -Path $file