DeployWorkstation v5.3 — Package ID Auto-Resolution & Reboot-Aware Installs
This release is all about install reliability. Earlier versions could report false failures when winget package IDs drifted or when an installer just needed a reboot to finish. v5.3 fixes both, adds automatic recovery when a package ID has been renamed or retired, and rebuilds the exit-code handling against winget's official return codes.
Safe to run on bare-metal images, freshly cleaned PCs, and already-deployed machines.
✨ Highlights
- 🔎 Package ID Auto-Resolution — Every winget ID is verified against the source before install. If the primary ID has been renamed or retired, DeployWorkstation tries an optional per-app fallback list, then a
winget searchby display name (adopted only when unambiguous), and logs candidate IDs when it can't decide for you. Results are cached per run (install + update share the cache), so this adds only a few seconds to a full deployment. - 🔄 Reboot-Aware Exit Handling — Installs that succeed but require a restart (Adobe Reader does this regularly) now count as success, set a
RebootNeededflag, and surface a restart notice in the summary and at end of run — instead of being retried and logged as network failures. - 🎯
--exactmatching everywhere — All install/upgrade calls now use--exact(plus--disable-interactivity) so a substring ID can't quietly match the wrong package or fail as ambiguous. - 📊 Smarter update mode — Apps that aren't installed are now logged as SKIPPED and tracked separately, rather than counted as update failures.
🐛 Bug Fixes
- Invalid .NET Framework package ID —
Microsoft.DotNet.Framework.4.8was never a valid winget ID, so every run failed that install with0x8A150014 NO_APPLICATIONS_FOUND. Corrected toMicrosoft.DotNet.Framework.Runtime(currently 4.8.1) withMicrosoft.DotNet.Framework.DeveloperPack_4as a fallback. On Win10 1903+ / Win11 the runtime ships in-box, so this typically resolves to a fast no-op. - Reboot exit codes misclassified as network errors —
0x8A150109(restart to finish) and0x8A15010A(restart before install) were treated as transient network faults and retried twice before being logged as failures. Reboot-to-finish now counts as success; reboot-before-install fails with the correct reason. - Wrong exit-code hex comments — Several return-code labels were incorrect (e.g.
-1978335212labeled0x8A15002Cis actually0x8A150014;-1978334960labeled "blocked by policy" is actually a dependency failure). Exit-code tables were rebuilt against winget's officialreturnCodes.md, and unknown codes now log their hex form for easy lookup. - Not-installed apps counted as update failures — In update mode,
0x8A150014fromwinget upgrade --idis now logged as SKIPPED and tracked separately.
🔧 Other Reliability Improvements
--include-unknownon upgrades handles apps whose installed version winget can't read — common after Windows Update services the .NET runtimes out from under winget.- Installer hash-mismatch errors now trigger a
winget source updatebefore retrying, since they're usually caused by a stale manifest. - Retry logic now distinguishes genuinely transient errors (network faults, stale-manifest hash mismatches) from reboot and policy conditions, which are no longer blindly retried.
⚠️ Notes & Requirements
- winget 1.4+ required — the script bootstraps the current release automatically on OEM machines where winget is missing or outdated.
- Existing
$script:ManagedAppsentries continue to work unchanged. To take advantage of auto-resolution, add an optionalFallbacks = @('Alternate.Id')list to any app entry (see the README for an example). TheNamefield doubles as thewinget searchterm of last resort, so keep it close to the app's actual display name in the winget catalog.
🚀 Upgrading
Pull the latest and re-run — no config migration needed:
git pull origin main# Update managed apps only
.\DeployWorkstation.ps1 -SkipBloatwareRemoval -SkipSystemConfig -UpdateAppsFull Changelog: v5.2...v5.3
Tested on Windows 10 (1909+) and Windows 11 — Pro & Home Editions.
What's Changed
- V5.3 by @Pnwcomputers in #17
Full Changelog: v5.2...v5.3