KristianandChris Titus fc03af421b Add friendly explanations for common DISM exit codes (#5087)
* Add friendly explanations for common DISM exit codes

Invoke-WinUtilISODism threw only a raw exit code on DISM failure
(e.g. "DISM add-driver failed with exit code 112"), leaving users to
look up what the number means themselves.

Adds a $knownExitCode lookup table mapping common Windows/DISM exit
codes (disk full, access denied, file/path not found, file in use,
timeout, etc.) to plain-English explanations. When a failure's exit
code is recognized, the thrown message now includes the explanation
in parentheses; unrecognized codes fall back to the original
plain-number message.

Verified the script still parses correctly after the change.

* Add missing period to fallback DISM error message

* Add tests for DISM known/unknown exit code error messages

Adds a test verifying a known exit code (112) produces the friendly
explanation in the thrown message, alongside the existing test
verifying an unrecognized code still falls back to the plain
numeric message.

Verified: all 35 tests in win11creator.Tests.ps1 pass.

* Document DISM friendly error messages in Win11 Creator troubleshooting

Adds a Troubleshooting table row explaining the new DISM error
message format (exit code + explanation in parentheses), with
guidance for the most common cases and a link to Microsoft's full
error code reference for anything not explained.

* Fix duplicate DISM calls in unmapped exit code test

The unmapped-code test called Invoke-WinUtilISOScript twice — once
via Should -Throw, once to capture the message for the no-parens
check — causing $script:dismCalls to double-count. Consolidated to
a single call, checking both the exit code and the absence of a
parenthesized explanation against one captured exception message.

Verified: all 36 tests in win11creator.Tests.ps1 pass.

* Fix broken DISM error code reference link in docs

Replaced the dead windows-hardware/manufacture link with Microsoft's
actual System Error Codes reference page, which DISM exit codes
correspond to.

* Strengthen DISM fallback regression coverage

---------

Co-authored-by: Chris Titus <contact@christitus.com>
2026-09-29 11:17:51 -05:00
2024-08-30 09:48:21 -05:00
2026-09-26 10:32:30 -05:00
2025-05-23 11:26:48 -05:00

Chris Titus Tech's Windows Utility

Version Downloads Discord

A curated compilation of Windows system tasks streamline installs, debloat with tweaks, troubleshoot with config, and configure Windows updates. Run it fresh on every new Windows install.

Title Screen


Quick Start

WinUtil must be run as Administrator because it performs system-wide changes.

Open PowerShell or Terminal as admin, then run:

Stable Branch (recommended)

irm https://christitus.com/win | iex

Development Branch

irm https://christitus.com/windev | iex

How to open an admin terminal

  • Start menu: Right-click Start → Windows PowerShell (Admin) or Terminal (Admin)
  • Search: Press the Windows key, and type PowerShell or Terminal, then Ctrl + Shift + Enter

Automation / Presets

Apply a predefined configuration without manual selection:

& ([ScriptBlock]::Create((irm https://christitus.com/win))) -Preset Standard
Preset Description
Standard Balanced defaults for most users
Minimal Minimal changes to suit every user
Advanced Deep tweaks for power users

To view exactly what each preset does, see: https://github.com/ChrisTitusTech/winutil/blob/main/config/preset.json


Build & Develop

See https://github.com/ChrisTitusTech/winutil/blob/main/.github/CONTRIBUTING.md


Resources


Support

Sponsors

These are the sponsors that help keep this project alive with monthly contributions.

User avatar: User avatar: MartinUser avatar: Jason A. DiegmuellerUser avatar: RMSUser avatar: PaulUser avatar: Dave J  (WhamGeek)User avatar: Anthony MendezUser avatar: User avatar: DursleyGuyUser avatar: User avatar: Kiera MeredithUser avatar: Sean (ANGRYxScotsman)User avatar: Fra · ppeUser avatar: José Encarnação

*Sponsors with a recurring subscription also get access to the .NET alternative.


Contributors

Contributors

Thanks to everyone who has contributed time and effort to this project. Keep rocking 🍻

S
Description
No description provided
Readme MIT
41 MiB
0 Stars 1 Watchers 0 Forks
Languages
PowerShell 96.4%
Python 3.6%