From e29aa056ba94f89398223e9103e8786975b21f6e Mon Sep 17 00:00:00 2001 From: TheTank20 Date: Sat, 8 Jul 2023 13:06:52 -0500 Subject: [PATCH] Update windows.yml --- .github/workflows/windows.yml | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index ab79feb..2439e3b 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -23,23 +23,17 @@ jobs: "Microsoft.VisualStudio.Component.WinXP" ) [string]$workloadArgs = $componentsToAdd | ForEach-Object {" --add " + $_} - $Arguments = ('/c', "vs_installer.exe", '--layout D:\a\VSLayout', $workloadArgs, '--quiet') + $Arguments = ('/c', "vs_installer.exe", '--layout', 'D:\a\VSLayout', $workloadArgs, '--quiet') $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden - if ($realProcess.ExitCode -eq 0) { - + if ($process.ExitCode -eq 0) + { + Write-Host "components have been successfully downloaded" + Get-ChildItem D:\a\VSLayout\Microsoft.Windows.XPSupport.* } - else { - $realProcess = Get-Process vs_setup_bootstrapper - if ($realProcess.ExitCode -eq 0) - { - Write-Host "components have been successfully downloaded" - Get-ChildItem D:\a\VSLayout\Microsoft.Windows.XPSupport.* - } - else - { - Write-Host "components were not downloaded" - exit 1 - } + else + { + Write-Host "components were not downloaded" + exit 1 } - name: Install Windows XP Support for Visual Studio