From 6e28946c0dd3348281d3b4970f8b280f26763f05 Mon Sep 17 00:00:00 2001 From: n0dai Date: Sat, 18 Jul 2026 18:38:32 +0200 Subject: [PATCH] iso-patch: force English DISM output for ISO language detection 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 #84 --- tools/iso-patch/iso-patch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/iso-patch/iso-patch.c b/tools/iso-patch/iso-patch.c index a85da68..86d5f4d 100644 --- a/tools/iso-patch/iso-patch.c +++ b/tools/iso-patch/iso-patch.c @@ -847,7 +847,7 @@ static int do_to_vhdx(const wchar_t *iso_path_arg, int image_index, int size_gb, const char *detected_lang = "en-US"; /* fallback */ GetSystemDirectoryW(sys_dir, MAX_PATH); swprintf_s(dism_cmd, 1024, - L"%s\\dism.exe /Get-WimInfo /WimFile:\"%s\" /Index:%d", + L"%s\\dism.exe /English /Get-WimInfo /WimFile:\"%s\" /Index:%d", sys_dir, wim_path, image_index); if (run_command_capture(dism_cmd, dism_output, sizeof(dism_output)) == 0) { /* Look for "xx-YY (Default)" pattern in DISM output */