message: ci: azure: Fix powershell scripts for MSI installation
diff: $ErrorActionPreference = "Stop"
  $BaseDir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
  +$WebClient = New-Object System.Net.WebClient
  # The visual studio import uses the Invoke-CmdScript from Wintellect:
  # https://github.com/Wintellect/WintellectPowerShell/blob/master/Code/Internal.ps1
  @@ -25,8 +26,11 @@ function main () {
  }
  }
  - # Install CMake nightly
  - Install-MSI -MsiUrl "https://cmake.org/files/dev/cmake-3.16.20191218-g8262562-win64-x64.msi" -MsiName "cmake-3.16.20191218-g8262562-win64-x64.msi" -ArgumentList "ADD_CMAKE_TO_PATH=System"
  + # Install CMake 3.17.2
  + Write-Host "Downloading CMake"
  + $WebClient.DownloadFile("https://github.com/Kitware/CMake/releases/download/v3.17.2/cmake-3.17.2-win64-x64.msi", "cmake-3.17.2-win64-x64.msi")
  + Write-Host "Installing CMake"
  + Start-Process -FilePath "msiexec.exe" -ArgumentList "/qb","/i","cmake-3.17.2-win64-x64.msi","ADD_CMAKE_TO_PATH=System" -Wait
  # Install Ninja
  if($jobName -match "ninja") {
  @@ -36,9 +40,16 @@ function main () {
  # Install MS-MPI
  if($jobName -match "msmpi") {
  - Write-Host "Installing MS-MPI"
  - Install-EXE -Url "https://github.com/microsoft/Microsoft-MPI/releases/download/v10.1.1/msmpisetup.exe" -Name "msmpisetup.exe" -ArgumentList "-unattend"
  - Install-MSI -MsiUrl "https://github.com/microsoft/Microsoft-MPI/releases/download/v10.1.1/msmpisdk.msi" -MsiName "msmpisdk.msi"
  + Write-Host "Downloading MS-MPI Runtime"
  + $WebClient.DownloadFile("https://github.com/microsoft/Microsoft-MPI/releases/download/v10.1.1/msmpisetup.exe", "msmpisetup.exe")
  + Write-Host "Installing MS-MPI Runtime"
  + Start-Process "msmpisetup.exe" -ArgumentList "-unattend" -Wait -NoNewWindow
  +
  + Write-Host "Downloading MS-MPI SDK"
  + $WebClient.DownloadFile("https://github.com/microsoft/Microsoft-MPI/releases/download/v10.1.1/msmpisdk.msi", "msmpisdk.msi")
  + Write-Host "Installing MS-MPI SDK"
  + Start-Process "msiexec.exe" -ArgumentList "/qb","/i","msmpisdk.msi" -Wait
  +
  Write-Host "##vso[task.setvariable variable=MSMPI_BIN;]C:\Program Files\Microsoft MPI\Bin"
  Write-Host "##vso[task.setvariable variable=MSMPI_INC;]C:\Program Files (x86)\Microsoft SDKs\MPI\Include"
  Write-Host "##vso[task.setvariable variable=MSMPI_LIB32;]C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x86"
  