iso-patch: force English DISM output for ISO language detection (fixes #84)#102
Open
n0dai wants to merge 1 commit into
Open
iso-patch: force English DISM output for ISO language detection (fixes #84)#102n0dai wants to merge 1 commit into
n0dai wants to merge 1 commit into
Conversation
The Windows ISO language detection (Step 2.5) parses `dism /Get-WimInfo`
output for the literal string "(Default)". DISM localizes its output to
the host UI language, so on any non-English host the marker never matches
("(Par defaut)" on French, etc.) and detection silently falls back to
en-US regardless of the ISO's actual language. The guest then gets an
en-US unattend (wrong keyboard layout / locale) even for fr-FR, ko-KR,
de-DE... ISOs.
Fix: pass DISM's documented global /English switch so the output is
always parseable. Failure behavior is unchanged (still falls back to
en-US if the pattern is absent).
Fixes jamesstringer90#84
n0dai
force-pushed
the
fix/iso-patch-localized-dism
branch
from
July 18, 2026 16:43
8db90ae to
6e28946
Compare
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.
Problem
The Windows ISO language detection (
tools/iso-patch/iso-patch.c, Step 2.5) parsesdism /Get-WimInfooutput looking for the literal string"(Default)". DISM localizes its output to the host UI language, so on any non-English host the marker never matches — French DISM prints(Par défaut), Korean prints(기본값), etc. Detection then silently falls back toen-USregardless of the ISO's actual language, and the guest is provisioned with anen-USunattend: wrong UI language, wrong keyboard layout (e.g. QWERTY on a French fr-FR ISO).This is exactly what #84 reports (
Detected ISO language: en-USfor a Korean ISO from the official Microsoft page).Fix
Pass DISM's documented global
/Englishswitch so the output is always in English and the"(Default)"pattern matches on every host locale:Failure behavior is unchanged: if the pattern is still absent for any reason, the code falls back to
en-USexactly as before.Testing
Rebuilt
iso-patch.exe(MSBuild, Release x64) on a French Windows 11 host and created a VM from a FrenchWin11_25H2_French_x64_v2.iso:Detected ISO language: en-US→ guest installs with en-US locale + US keyboard.Fixes #84