Repository navigation
v5.4 reliability pass: fix hangs, misreported errors and CI - #19
Merged
Merged
Conversation
- McAfee: MSI uninstalls use /X{GUID} /qn instead of /S (msiexec showed a
hidden usage dialog and hung the run); timeout and real exit codes
- Winget bootstrap re-checks the version after each step, adds a
Repair-WinGetPackageManager fallback, and runs in compatibility mode
rather than failing every install on an old winget
- Offline runs no longer report every app as "Package ID not found"
- Retry install-in-progress and download failures; handle restart codes
correctly during bloatware removal
- Count Appx/capability removals only when they succeed
- Exit code 2 on warnings, -NoPause switch, log/report fallback to
ProgramData, HTML report shows real version and update counters
- Fix CI (Pester 5 config, JUnit output, PS 5.1 run) and add unit tests
that exercise the script's functions against a fake winget
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
codespell flagged valid es-ES localization words, code identifiers (PressEnter, Pester's AfterAll) and the existing COMPATABILITY.md file name; add them to the ignore list. Fix the one real typo (unparseable). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A reliability pass on
DeployWorkstation.ps1and the launchers, from a code review focused on function and error handling. It fixes one bug that can hang a whole run, several places where errors were misreported, and a CI workflow that hadn't run a single test since v5.3.Highest impact
/S /quietwas added to MSI uninstall strings too.msiexecdoesn't accept/S, so it opened a usage dialog in a hidden window and the script waited on it indefinitely. MSI entries now runmsiexec /X{GUID} /qn /norestart,QuietUninstallStringis used when present, there's a 20-minute timeout, and exit codes are checked (3010/1641= success + restart,1605= already gone). Before, every product was logged as "Removed" whatever actually happened.Repair-WinGetPackageManageris a last resort (it also installs the VCLibs/UI.Xaml dependencies). If winget still can't be upgraded, the run carries on without the newer flags instead of failing every install.0x8A150014) counts as a bad ID now; any otherwinget showfailure lets the install show the real error and use its retries.Error handling
0x8A150102, common right after first boot, with a 3× longer wait) and "download failed" (0x8A150008).0x8A15010A(restart required) was logged as "not installed"; uninstalls that finish after a restart are now OK and set the restart flag; thewinget listexit code now skips uninstall attempts for patterns with nothing installed.0x80073CFA) are reported as skipped. Provisioned packages are listed once per run instead of once per pattern.0success,2completed with warnings,1critical error. The.batlauncher reports each.-NoPauseswitch for unattended/RMM runs (both launchers pass it and pause themselves); a critical error now pauses so it can be read.%ProgramData%\DeployWorkstationwhen the script folder is read-only.—because the file has no BOM; they're now ASCII.DeployWorkstation.batoption 1 printed a garbled(none - full runline (unescaped parenthesis).CI / tests
-OutputFormat, which Pester 5 doesn't accept, so every run since v5.3 failed before testing. It now uses the Pester 5 configuration API with JUnit output, under both PowerShell 7 and Windows PowerShell 5.1.winget: exit-code tables, ID resolution, retries, uninstall-string parsing, bloatware exit handling, localization keys, version consistency and the HTML report. A guard aborts if the fakewingetisn't in effect.Type of change
-NoPause, exit codes, log fallback)Invoke-WingetWithRetry)Checklist
Verification notes for reviewers
.batlauncher was run against a stand-in script: it reports exit codes 0, 2 and 1 correctly and passes-NoPauseand the right flags.Breaking changes
Microsoft.WinGet.Clientmodule; it only runs when the first two bootstrap steps fail.Left alone on purpose: the permanent msstore source removal, the broad bloatware name patterns (
'Teams','Outlook'), the JSON profiles that nothing reads yet, and the QuickStart menu numbering.🤖 Generated with Claude Code