Skip to content

Instantly share code, notes, and snippets.

[array]$AppName = "Microsoft Visual C++ 2015-2019", "Microsoft Visual C++ 2015-2022"
[version]$RequiredVersion = "14.27.29112.0"
[string]$Architecture = "x64"
[array]$Hives = "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\",
"Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"
$Hives | ForEach-Object {
Get-ChildItem -Path $_ | ForEach-Object {
$Properties = $_ | Get-ItemProperty