Update windows.yml

This commit is contained in:
TheTank20 2023-07-08 13:06:52 -05:00 committed by GitHub
parent d833a10b13
commit e29aa056ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 15 deletions

View File

@ -23,23 +23,17 @@ jobs:
"Microsoft.VisualStudio.Component.WinXP" "Microsoft.VisualStudio.Component.WinXP"
) )
[string]$workloadArgs = $componentsToAdd | ForEach-Object {" --add " + $_} [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 $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 { else
$realProcess = Get-Process vs_setup_bootstrapper {
if ($realProcess.ExitCode -eq 0) Write-Host "components were not downloaded"
{ exit 1
Write-Host "components have been successfully downloaded"
Get-ChildItem D:\a\VSLayout\Microsoft.Windows.XPSupport.*
}
else
{
Write-Host "components were not downloaded"
exit 1
}
} }
- name: Install Windows XP Support for Visual Studio - name: Install Windows XP Support for Visual Studio