Microsoft Visual C++ 2012 Redistributable (x64)

From LANCommander
Revision as of 05:24, 5 November 2023 by DoctorDalek (talk | contribs) (Created page with "Category:Redistributables {{Redistributable.Scripts.DetectInstall |Name = Install Detection |Description = This script will look at the installed package list from Windows for anything matching Visual C++ 2012 Redistributable (x64). |RequiresAdmin = False |Contents = <syntaxhighlight lang="powershell" line> $Installed = Get-Package "Microsoft Visual C++ 2012 Redistributable (x64)*" if ($Installed.Length -ge 0) { exit 1; } else { exit 0; } </syntaxhighlight>...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Install Detection

This script will look at the installed package list from Windows for anything matching Visual C++ 2012 Redistributable (x64).

$Installed = Get-Package "Microsoft Visual C++ 2012 Redistributable (x64)*"

if ($Installed.Length -ge 0) {
    exit 1;
} else {
    exit 0;
}

Install Script

This script installs the Visual C++ 2012 Redistributable (x64) redistributable silently.

Write-Host "Installing Visual C++ 2012 Redistributable (x64)..."
Start-Process -FilePath "vcredist_x64.exe" -ArgumentList "/quiet /norestart" -Wait -Passthru
Write-Host "Done!"