Skip to content

Commit

Permalink
Merge pull request #139 from philips-forks/fix_duplicate_update
Browse files Browse the repository at this point in the history
Add condition to check for duplicate queued updates
  • Loading branch information
rgl authored Dec 17, 2023
2 parents 7ab2bdb + db8b1d3 commit a95e470
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions update/windows-update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,11 @@ for ($i = 0; $i -lt $searchResult.Updates.Count; ++$i) {
Write-Output "Warning The update '$updateTitle' has the CanRequestUserInput flag set (if the install hangs, you might need to exclude it with the filter 'exclude:`$_.InstallationBehavior.CanRequestUserInput' or 'exclude:`$_.Title -like '*$updateTitle*'')"
}

if (($updatesToInstall | Select-Object -ExpandProperty Title) -contains $updateTitle) {
Write-Output "Warning, Skipping queueing the duplicated titled update '$updateTitle'."
continue
}

Write-Output "Found $updateSummary"

$update.AcceptEula() | Out-Null
Expand Down

0 comments on commit a95e470

Please sign in to comment.