diff --git a/chocolatey-visualstudio.extension/CHANGELOG.md b/chocolatey-visualstudio.extension/CHANGELOG.md index e8d18eac..84050077 100644 --- a/chocolatey-visualstudio.extension/CHANGELOG.md +++ b/chocolatey-visualstudio.extension/CHANGELOG.md @@ -5,6 +5,7 @@ - The update process is short-circuited if the installed product version is already DesiredProductVersion or higher. - After the update, the installed product version is checked to determine if the update actually happened. This makes it possible to detect a bug in the Visual Studio installer, which sometimes fails to download the channel manifest and thinks no update is needed. - Fixed installed products detection being invoked twice by mistake. +- Updated workaround for the bootstrapper ignoring --wait when updating the VS Installer to account for a new process used by the VS Installer in 16.9+ (GH-7, GH-97). ## Version 1.9.0 - Added custom handling for '--installCatalogUri' to better support installations from layout without '--noWeb' ([GH-65](https://github.com/jberezanski/ChocolateyPackages/pull/65)). diff --git a/chocolatey-visualstudio.extension/extensions/Wait-VSInstallerProcesses.ps1 b/chocolatey-visualstudio.extension/extensions/Wait-VSInstallerProcesses.ps1 index 639f164f..dfeede61 100644 --- a/chocolatey-visualstudio.extension/extensions/Wait-VSInstallerProcesses.ps1 +++ b/chocolatey-visualstudio.extension/extensions/Wait-VSInstallerProcesses.ps1 @@ -36,10 +36,11 @@ function Wait-VSInstallerProcesses # This sometimes happens when the VS installer is updated by the invoked bootstrapper. # The initial process exits, leaving another instance of the VS installer performing the actual install in the background. # This happens despite passing '--wait'. - $vsInstallerProcessNames = @('vs_bootstrapper', 'vs_setup_bootstrapper', 'vs_installer', 'vs_installershell', 'vs_installerservice') + $vsInstallerProcessNames = @('vs_bootstrapper', 'vs_setup_bootstrapper', 'vs_installer', 'vs_installershell', 'vs_installerservice', 'setup') + $vsInstallerProcessFilter = { $_.Name -ne 'setup' -or $_.Path -like '*\Microsoft Visual Studio\Installer\setup.exe' } do { - $vsInstallerProcesses = Get-Process -Name $vsInstallerProcessNames -ErrorAction SilentlyContinue | Where-Object { $null -ne $_ -and -not $_.HasExited } + $vsInstallerProcesses = Get-Process -Name $vsInstallerProcessNames -ErrorAction SilentlyContinue | Where-Object { $null -ne $_ -and -not $_.HasExited } | Where-Object $vsInstallerProcessFilter $vsInstallerProcessCount = ($vsInstallerProcesses | Measure-Object).Count if ($vsInstallerProcessCount -gt 0) {