Created
February 15, 2025 17:30
-
-
Save lazuee/c2a853f2cc26a3531d2b284553a0b0b7 to your computer and use it in GitHub Desktop.
Winget: Install Visual C++ Redistributable Runtimes AIO
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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