Unattended always adding some additional language/keyboard

  • Thread starter Thread starter Brutser
  • Start date Start date
B

Brutser

Guest
Why is Windows 11 always adding some additional keyboard and/or language?
Even if I remove all other languages and keyboards from the image, i always end up with an first run that shows the language bar (because it has added a 2nd option for language/keyboard combination).
Especially for Belgium, it always will add French (Belgian keyboard AZERTY) for no reason even if this language and keyboard are removed.
 
Have you checked (and possibly configured) that your language (Belgium) is correctly configured in "unattended"?
 
I just have a Windows 11 setup completed with language/keyboard only showing English(US)/US International keyboard, location Belgium, Regional Format English(Belgium) then I had NTLite fill in the unattended automatically, it shows the proper settings to me:

<InputLocale>0409:00000409</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>
<UserLocale>en-BE</UserLocale>

And like I said, even if I remove all other languages and all other keyboards, first log-in after install will show French/Belgian keyboard (AZERTY)...
 
garlin for some reason the Post-Setup (After logon) is executed for the Administrator user - I guess Windows installer is administrator at that phase, even though I set the non-admin user as autologin - NTLite says it's after logon (User) though.
XML:
<Execution BeforeLogonMode="0">
        <Remove></Remove>
        <Change></Change>
        <Add>
            <Item type="20">
                <Path>powershell</Path>
                <Params>Set-WinHomeLocation -GeoID 21</Params>
                <Index>1000</Index>
            </Item>
            <Item type="20">
                <Path>powershell</Path>
                <Params>Set-Culture en-BE</Params>
                <Index>1001</Index>
            </Item>
        </Add>
</Execution>
 
Post-Setup (Machine) or Before logon, runs as SYSTEM user.
Post-Setup (User) or After logon, runs with Admin rights, but as "you".

You can check by running "powershell whoami > C:\log.txt"
 
It is a struggle to get this working the way I want it, I just want basically 1 language, 1 keyboard and a fixed country, regional format - but it's not working through unattended, as it will simply add the Belgian keyboard if UserLocale is set to en-BE as garlin explained and I can add a powershell command (which is currently running as the admin user, not the standard user for which I want this), but then it won't work for future users.
I found this:

https://i.sstatic.net/Vx08B.png (picture found from this url)

This is kind of setting the defaults for future users, if this can be set properly before Windows installer is creating the user, then that could work.
If just use the unattended and UserLocale, we always end up with additional keyboards, at least the US keyboard will always be added as an additional.

off-topic: As for removing keyboards and languages with NTLite, when adding keyboards from the UI, you get all empty keyboard listings for the removed ones. This is expected I guess, but made me decide not to remove them :)
 
garlin so in other words, i still appreciate your input as I am nowhere close to a good solution yet :p
 
From browsing the top-listed solution, you try running "reg delete HKEY_USERS\.DEFAULT\Keyboard Layout\Preload /f" from Post-Setup (Before logon). I imagine OOBE is writing the unwanted locale values to Preload. So deleting it right after OOBE might fix it for all future users.
 
I still end up with all settings correct, except French (Belgium) keyboard installed - but no 2nd keyboard is now present when adding the reg delete.
Still I would like not to have the French (Belgium) keyboard but the US (qwerty) one only.
 
Screenshot-2024-06-02-174007.png


By setting <UserLocale>en-BE</UserLocale> the Format "English (Belgium)" and the Location: "Belgium" is what I want and as you can see is also set for future users, that is also desired.
However, the Input language: "French (Belgium) - Belgian French" will be set automatically as you explained by this UserLocale as well.

Ideally I want an unattended install that set the Input language: English (United States) - US keyboard and have everything else stay the same with no additional keyboards.
 
maybe here is the solution?
how must I implement this in current version NTLite, without setupcomplete.cmd ?
Are these commands for the current user or for all users?
 
View attachment 12015
Yes, this at least set it correctly for the new user, now all I have to do probably is run the powershell commands for the admin user as garlin showed before, then I will add the standard user also from powershell, because if I would create this from unattended, again this would not work I guess. garlin can you comment on this? thanks.
 
View attachment 12016

So the new user shows this in Language Settings, it's really insane, it still shows French (Belgium) and the French keyboard:View attachment 12017
Yet, the actual keyboard is indeed the US International keyboard as set with the registry settings, what is going on?
 
Found some solution, though it is not perfect, it should work:

Powershell script:

Code:
# US International keyboard

$List = Get-WinUserLanguageList
$List[0].InputMethodTips.Remove('0409:00000409')
$List[0].InputMethodTips.Add('0409:00020409')
Set-WinUserLanguageList $List -Force

# Belgian regional format

Set-WinHomeLocation -GeoID 21
Set-Culture en-BE

Copy-UserInternationalSettingsToSystem -WelcomeScreen $True -NewUser $True

garlin I added this script as a file in Post-Setup, but it's stuck at execution it seems:

XML:
<Execution BeforeLogonMode="0">
        <Remove></Remove>
        <Change></Change>
        <Add>
            <Item type="30">
                <Path>C:\NTLITE\belgium.ps1</Path>
                <Params></Params>
                <DestMode>1</DestMode>
                <Index>1000</Index>
            </Item>
        </Add>
</Execution>

What am I doing wrong?
 
You can't use Get-WinUserLanguageList during Post-Setup (Before logon), because all commands run as SYSTEM.
SYSTEM doesn't have a normal user profile, because it's not an interactive user.

I believe the correct answer would be a (Before logon) PS script to load the Default User's NTUSER.DAT, and force your changes there.
 
garlin but I use it After logon (BeforeLongonMode="0") to set it for the default admin user, so after this all users will be created.
 
garlin if I put the script in separate commands (after logon), it works except for the keyboard section, i guess the variable I cannot use over multiple commands, so that is why I tried putting it all in a script.
 
Back
Top