diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index 1b411672..46792679 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -355,6 +355,12 @@ "elevated_user": "{{user `install_user`}}", "elevated_password": "{{user `install_password`}}" }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-VSWhere.ps1" + ] + }, { "type": "powershell", "scripts":[ @@ -774,6 +780,12 @@ "{{ template_dir }}/scripts/Installers/Validate-Vcpkg.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-VSWhere.ps1" + ] + }, { "type": "powershell", "scripts":[ diff --git a/images/win/scripts/Installers/Install-VSWhere.ps1 b/images/win/scripts/Installers/Install-VSWhere.ps1 new file mode 100644 index 00000000..d6098654 --- /dev/null +++ b/images/win/scripts/Installers/Install-VSWhere.ps1 @@ -0,0 +1,6 @@ +################################################################################ +## File: Install-VSWhere.ps1 +## Desc: Install latest stable version of VSWhere +################################################################################ + +choco install vswhere -y diff --git a/images/win/scripts/Installers/Validate-VSWhere.ps1 b/images/win/scripts/Installers/Validate-VSWhere.ps1 new file mode 100644 index 00000000..7b41519c --- /dev/null +++ b/images/win/scripts/Installers/Validate-VSWhere.ps1 @@ -0,0 +1,25 @@ +################################################################################ +## File: Validate-VSWhere.ps1 +## Desc: Validate vswhere +################################################################################ + +if(Get-Command -Name 'vswhere') +{ + Write-Host "vswhere $(vswhere) on path" +} +else +{ + Write-Host "vswhere is not on path" + exit 1 +} + +# Adding description of the software to Markdown +$SoftwareName = "VSWhere" +$VswhereVersion = $(vswhere) + +$Description = @" +_Version_: $VswhereVersion
+* PATH: contains location of vswhere.exe +"@ + +Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description \ No newline at end of file