[Windows][Improvement] Split and simplify "InitializeVM.ps1" script (#3806)

* improve InitializeVM script

* Update windows2019.json

* remove configs

* resolve comments

* resolve comments; fix order

* fix templates
This commit is contained in:
Maxim Lobanov
2021-07-29 10:46:27 +03:00
committed by GitHub
parent 7b1d76227c
commit 2e8f85a83b
12 changed files with 111 additions and 328 deletions

View File

@@ -0,0 +1,15 @@
if (Test-IsWin16) {
# Install vcredist140
Choco-Install -PackageName vcredist140
}
if (Test-IsWin19) {
# Install vcredist2010
$Vc2010x86Name = "vcredist_x86.exe"
$Vc2010x86URI = "https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/${Vc2010x86Name}"
$Vc2010x64Name = "vcredist_x64.exe"
$Vc2010x64URI = "https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/${Vc2010x64Name}"
$ArgumentList = ("/install", "/quiet", "/norestart")
Install-Binary -Url $Vc2010x86URI -Name $Vc2010x86Name -ArgumentList $ArgumentList
Install-Binary -Url $Vc2010x64URI -Name $Vc2010x64Name -ArgumentList $ArgumentList
}