Files
runner-images/images/windows/scripts/build/Install-Wix.ps1
Erik Bershel 9690ca4c70 [Windows] Add WIX binaries folder to the PATH (#9582)
* [Windows] Add WIX binaries folder to the PATH

* Add Update-Environment, small prettifying

* Move tests from script to Pester

* Fix Wix tests to use Join-Path

---------

Co-authored-by: Leon Zandman <lzandman@github.com>
2024-03-29 11:51:52 +01:00

15 lines
565 B
PowerShell

################################################################################
## File: Install-Wix.ps1
## Desc: Install WIX.
################################################################################
Install-ChocoPackage wixtoolset -ArgumentList "--force"
Update-Environment
$currentPath = [System.Environment]::GetEnvironmentVariable("PATH", "Machine")
$newPath = $currentPath + ";$(Join-Path -Path $env:WIX -ChildPath "bin")"
[Environment]::SetEnvironmentVariable("PATH", $newPath, "Machine")
Update-Environment
Invoke-PesterTests -TestFile "Wix"