Microsoft Visual C++ 2019 Redistributable (x64): Difference between revisions
DoctorDalek (talk | contribs) No edit summary |
DoctorDalek (talk | contribs) No edit summary |
||
Line 5: | Line 5: | ||
|RequiresAdmin = False | |RequiresAdmin = False | ||
|Contents = <syntaxhighlight lang="powershell" line> | |Contents = <syntaxhighlight lang="powershell" line> | ||
$Installed = Get-Package "Microsoft Visual C++ 2015-20* Redistributable ( | $Installed = Get-Package "Microsoft Visual C++ 2015-20* Redistributable (x64)*" | ||
if ($Installed.Length -ge 0) { | if ($Installed.Length -ge 0) { |
Revision as of 05:34, 5 November 2023
Install Detection
This script will look at the installed package list from Windows for anything matching Visual C++ 2019 Redistributable (x64).
$Installed = Get-Package "Microsoft Visual C++ 2015-20* Redistributable (x64)*"
if ($Installed.Length -ge 0) {
exit 1;
} else {
exit 0;
}
Install Script
This script installs the Visual C++ 2019 Redistributable (x64) redistributable silently.
Write-Host "Installing Visual C++ 2019 Redistributable (x64)..."
Start-Process -FilePath "VC_redist.x64.exe" -ArgumentList "/quiet /norestart" -Wait -Passthru
Write-Host "Done!"