Skip to content

Instantly share code, notes, and snippets.

@lazuee
Created February 15, 2025 17:30
Show Gist options
  • Save lazuee/c2a853f2cc26a3531d2b284553a0b0b7 to your computer and use it in GitHub Desktop.
Save lazuee/c2a853f2cc26a3531d2b284553a0b0b7 to your computer and use it in GitHub Desktop.
Winget: Install Visual C++ Redistributable Runtimes AIO
$arch = ((systeminfo | findstr /C:"System Type") -replace 'System Type:\s*', '' -split '-')[0].Trim().ToLower()
$ids = winget search Microsoft.VCRedist | Where-Object { $_ -match $arch } | ForEach-Object { [regex]::Match($_,'(Microsoft\.VCRedist\S+)').Value }
$ids | ForEach-Object { winget install -e --id $_ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment