ntdevlabs / tiny11builder

Scripts to build a trimmed-down Windows 11 image.
9.23k stars 812 forks source link

Option to add additional language packs to tiny11 core #241

Open phly95 opened 1 week ago

phly95 commented 1 week ago

When trying to add a language pack using the ISO from https://learn.microsoft.com/en-us/azure/virtual-desktop/windows-11-language-packs It appears the following error happens.

2024-09-08 11:20:09, Error CSI 000071c6@2024/9/8:18:20:09.923 (F) onecore\base\wcp\componentstore\com\store.cpp(4935): Error E_UNEXPECTED originated in function Windows::COM::CComponentStore::InternalTransact expression: ((HRESULT)0x8000FFFFL) [gle=0x80004005]

I was running dism /online /add-package /packagepath:"F:\LanguagesAndOptionalFeatures\Microsoft-Windows-Client-Language-Pack_x64_ja-jp.cab"

It does seem that other language features do install, like basic typing, speech, etc.

phly95 commented 1 week ago

The quickest way to install the language features (other than changing your OS to the language) create a bat file on the desktop and use windows search to find the correct cabs to drag on to the bat.

The bat (AI generated):

@echo off
setlocal enabledelayedexpansion

:: Create a temporary file to log the files to be processed
set "tempfile=%~dp0cab_files_to_process.txt"

:: Write the list of files to be processed to the temporary file
echo Files to be processed: > "%tempfile%"
for %%F in (%*) do (
    echo %%F >> "%tempfile%"
)

:: Self-elevate the script if not already running as administrator
if not "%1"=="am_admin" (
    powershell -Command "Start-Process -Verb RunAs -FilePath '%0' -ArgumentList 'am_admin %*'"
    exit /b
)

:: Process each .cab file
for %%F in (%*) do (
    if /i "%%~xF"==".cab" (
        echo Installing: %%F
        dism /online /add-package /packagepath:"%%F"
    )
)

:: Delete the temporary file
del "%tempfile%"

echo All CAB files have been processed and installed.
pause

Then you can search for your language of choice (eg. es-mx) and at the end, you will find all the "Microsoft-Windows-Language-Features" entries, you can drag on top of the bat file on your desktop.

image

You can also do the same if you want features like speech to text for en-us, if that's what your OS language is set to.