[Windows 2019] Fix missing msvcr100.dll (#1427)

* install vcredist2010

* Microsoft Visual C++ docs section
This commit is contained in:
Aleksandr Chebotov
2020-08-19 10:32:35 +03:00
committed by GitHub
parent 2602d38877
commit 9110b38999
3 changed files with 27 additions and 0 deletions

View File

@@ -223,4 +223,21 @@ function Get-NewmanVersion {
function Get-GHVersion {
return "GitHub CLI $(gh --version)"
}
function Get-VisualCPPComponents {
$vcpp = Get-CimInstance -ClassName Win32_Product -Filter "Name LIKE 'Microsoft Visual C++%'"
$vcpp | Sort-Object Name, Version | ForEach-Object {
$isMatch = $_.Name -match "^(?<Name>Microsoft Visual C\+\+ \d{4})\s+(?<Arch>\w{3})\s+(?<Ext>.+)\s+-"
if ($isMatch) {
$name = '{0} {1}' -f $matches["Name"], $matches["Ext"]
$arch = $matches["Arch"].ToLower()
$version = $_.Version
[PSCustomObject]@{
Name = $name
Architecture = $arch
Version = $version
}
}
}
}