diff --git a/images/win/Windows2016-Azure.json b/images/win/Windows2016-Azure.json index a29928b86..3c12ab023 100644 --- a/images/win/Windows2016-Azure.json +++ b/images/win/Windows2016-Azure.json @@ -124,7 +124,8 @@ ], "scripts":[ "{{ template_dir }}/scripts/Installers/Install-PowerShellModules.ps1", - "{{ template_dir }}/scripts/Installers/Initialize-VM.ps1" + "{{ template_dir }}/scripts/Installers/Initialize-VM.ps1", + "{{ template_dir }}/scripts/Installers/Install-WebPlatformInstaller.ps1" ], "execution_policy": "unrestricted" }, diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index 44059d360..c0bee9873 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -124,7 +124,8 @@ ], "scripts":[ "{{ template_dir }}/scripts/Installers/Install-PowerShellModules.ps1", - "{{ template_dir }}/scripts/Installers/Initialize-VM.ps1" + "{{ template_dir }}/scripts/Installers/Initialize-VM.ps1", + "{{ template_dir }}/scripts/Installers/Install-WebPlatformInstaller.ps1" ], "execution_policy": "unrestricted" }, diff --git a/images/win/scripts/Installers/Initialize-VM.ps1 b/images/win/scripts/Installers/Initialize-VM.ps1 index 27efea2b5..550eb8a34 100644 --- a/images/win/scripts/Installers/Initialize-VM.ps1 +++ b/images/win/scripts/Installers/Initialize-VM.ps1 @@ -114,9 +114,6 @@ choco feature enable -n allowGlobalConfirmation # Remove some of the command aliases, like `cpack` #89 Remove-Item -Path $env:ChocolateyInstall\bin\cpack.exe -Force -# Install webpi -Choco-Install -PackageName webpicmd - if (Test-IsWin16) { # Install vcredist140 Choco-Install -PackageName vcredist140 diff --git a/images/win/scripts/Installers/Install-WebPlatformInstaller.ps1 b/images/win/scripts/Installers/Install-WebPlatformInstaller.ps1 new file mode 100644 index 000000000..2263b3a9a --- /dev/null +++ b/images/win/scripts/Installers/Install-WebPlatformInstaller.ps1 @@ -0,0 +1,11 @@ +################################################################################ +## File: Install-WebPI.ps1 +## Desc: Install WebPlatformInstaller +################################################################################ + +# Download and install WebPlatformInstaller +$webPlatformInstallerFile = "WebPlatformInstaller_x64_en-US.msi" +$webPlatformInstallerUrl = "http://go.microsoft.com/fwlink/?LinkId=287166" +Install-Binary -Url $webPlatformInstallerUrl -Name $webPlatformInstallerFile -ArgumentList ("/silent", "/install") + +Invoke-PesterTests -TestFile "Tools" -TestName "WebPlatformInstaller" \ No newline at end of file diff --git a/images/win/scripts/Tests/Tools.Tests.ps1 b/images/win/scripts/Tests/Tools.Tests.ps1 index 22d17b7e2..88f2ca88f 100644 --- a/images/win/scripts/Tests/Tools.Tests.ps1 +++ b/images/win/scripts/Tests/Tools.Tests.ps1 @@ -243,6 +243,12 @@ Describe "VSWhere" { } } +Describe "WebPlatformInstaller" { + It "WebPlatformInstaller" { + "WebPICMD" | Should -ReturnZeroExitCode + } +} + Describe "Zstd" { It "zstd" { "zstd -V" | Should -ReturnZeroExitCode