Skip to content

Comments

Improve Windows Update Completion Handling with Extended Validation and Optional Reboot Delay#161

Closed
hendrie6 wants to merge 42 commits intorgl:masterfrom
hendrie6:master
Closed

Improve Windows Update Completion Handling with Extended Validation and Optional Reboot Delay#161
hendrie6 wants to merge 42 commits intorgl:masterfrom
hendrie6:master

Conversation

@hendrie6
Copy link

@hendrie6 hendrie6 commented Feb 5, 2026

Description:
This pull request adds additional safeguards to handle scenarios where Windows Updates successfully complete but the worker process does not exit as expected.

Issues resolved:
This addresses multiple issues that are opened related to TiWorker 'hanging' (#147 #49 #91).

Code added:
To address this, I’ve introduced extended validation logic that more reliably determines update completion by inspecting:

  • Windows Event Logs
  • Windows CBS logs

This functionality is controlled via a new optional flag:
use_extended_validation — when enabled, the worker uses log-based validation to confirm update status rather than relying solely on process behavior.

In addition, this PR adds:
reboot_delay — a configurable delay (in seconds) that pauses execution after updates complete when a reboot is required. This allows systems additional time to settle before the workflow proceeds. I mainly use this when testing the process and needing it to pause while I troubleshoot before a forced reboot.

These changes aim to improve reliability in edge cases while remaining fully backward-compatible and are opt-in.

Thanks for reviewing — feedback is very welcome!

Added functionality to check for updates
Removed GPG key import step and updated artifact name.
Updated zip file naming convention and added overwrite option for release action.
Updated the release workflow to build separate plugins for Windows and Linux, and adjusted the SHA256SUMS generation accordingly.
Updated build commands to include version in output filenames and added a step to list release artifacts.
Updated comments and improved error handling in the Windows Update script.
Handle additional eventvwr message when updates are being downloaded and KB string is in the ReplacementString array
Added information about the default value of reboot_delay.
Copy link
Author

@hendrie6 hendrie6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding RebootDelay and UseExtendedValidation parameters. Not specifying them results in the same current functionality.

Specifying a reboot delay in seconds delays the reboot after successful installation where a reboot is required. Mainly to help with troubleshooting purposes.

Setting UseExtendedValidation to true results in extending the monitoring of the Windows update installation status based on event logs and CBS logs. I've found this to resolve issues where TIWorker.exe doesn't exit after completing an installation, resulting in this module looping while it waits for TIWorker.exe to exit even though the update has already installed.

@hendrie6 hendrie6 closed this Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant