Install Choco if needed

This commit is contained in:
Chris Titus 2024-05-09 23:14:54 -07:00
parent cc02facb11
commit 5c65f32fdf

View File

@ -59,6 +59,7 @@ Function Install-WinUtilProgramWinget {
continue
}
Write-Host "Attempting installation with Chocolatey as a fallback method"
Install-WinUtilChoco
$status = $(Start-Process -FilePath "choco" -ArgumentList "install $Program -y" -Wait -PassThru).ExitCode
if($status -eq 0){
Write-Host "$Program installed successfully using Chocolatey."