Created
February 15, 2025 17:30
-
-
Save lazuee/c2a853f2cc26a3531d2b284553a0b0b7 to your computer and use it in GitHub Desktop.
Revisions
-
lazuee created this gist
Feb 15, 2025 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ $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 $_ }