aaronparker / vcredist

Lifecycle management for the Microsoft Visual C++ Redistributables
https://vcredist.com
MIT License
132 stars 17 forks source link

Feature Request: Use Get-InstalledVcRedist for updating of installed Runtimes #169

Open miawri opened 5 months ago

miawri commented 5 months ago

It would be good if we could use Get-InstalledVcRedist to just update any currently installed runtimes.

e.g.Install-VcRedist -VcList (Get-InstalledVcRedist -ExportAll) | Save-VcRedist -Path c:\Temp

aaronparker commented 5 months ago

You can do this:

$Path = "$Env:SystemRoot\Temp\VcRedist"
New-Item -Path $Path -ItemType "Directory"
$InstalledVcRedist = Get-InstalledVcRedist
Get-VcList -Export All | Where-Object { $_.Release -in $InstalledVcRedist.Release -and $_.Architecture -in $InstalledVcRedist.Architecture } | Save-VcRedist -Path $Path | Install-VcRedist