Remove keyboard layout and set time format during setup

pieterdezwart

New Member
Hi everyone,

I'm building a new Windows 11 22H2 ISO and want to change the time format to 24H and remove the US keyboard layout during setup (I have set US-International to be the default using AutoUnattend). For this I tried to use a reg file which works perfectly fine when applied directly from a live install.

Unfortunately I can't get the same reg file to apply at all during setup. I tried to ways:
  1. Integrate the reg file with NTLite -> Installation succeeds without error, but the US keyboard and the default 12H time format are still there
  2. Edit the registry during setupcomplete.cmd:
Code:
reg load "HKU\CurrentUsersDefault" "%SystemDrive%\Users\Default\NTUSER.DAT">NUL
reg import "%WINDIR%\Setup\Files\enclockandkeyboard.reg">NUL
This Results in multiple errors during install that look like this: https://www.askvg.com/fix-something...s-in-windows-10-and-windows-11-installations/

How do I get these changes to apply? The reason I want to remove the US keyboard layout is because of the annoying input method picker on the taskbar and the accidental layout switching (a way to just remove that button and prevent accidental switching is also fine, but the method I used for this in Windows 10 no longer works).
 

Attachments

  • enclockandkeyboard-setupcomplete.reg
    1.5 KB
  • enclockandkeyboard-ntliteintegrate.reg
    1.3 KB
Later Windows versions apparently override NTUSER.DAT's locale settings (language, keyboard, date format) during install.
This workaround changes the date format, and I presume would work for the keyboard.

https://www.ntlite.com/community/in...es-remove-taskbar-pinned-apps.2570/post-23660
Thanks, this made it possible to change the time format and remove the keyboard for all users. However, on the login screen the language bar still appears:
1664217886299.png
I want the language bar gone from there as well. I tried copying over the settings using Administrative language settings, but to no avail. Removing the keyboard from HKEY_CURRENT_USER\Control Panel\International also has no effect, as the registry entry keeps reappearing.

This is what my setupcomplete.cmd looks like:
Code:
reg load HKU\TEMP "%SystemDrive%\Users\Default\NTUSER.DAT"
reg add "HKU\TEMP\Control Panel\International" /v sTimeFormat /t REG_SZ /d "HH:mm:ss" /f
reg add "HKU\TEMP\Control Panel\International" /v sShortTime /t REG_SZ /d "HH:mm" /f
reg add "HKU\TEMP\Control Panel\International" /v iTime /t REG_SZ /d "1" /f
reg add "HKU\TEMP\Control Panel\International\User Profile\en-US" /v 0409:00020409 /t REG_DWORD /d 1 /f
reg add "HKU\TEMP\Control Panel\International\User Profile" /v InputMethodOverride /t REG_SZ /d "0409:00020409" /f
reg delete "HKU\TEMP\Control Panel\International\User Profile System Backup\en-US" /va /f
reg add "HKU\TEMP\Control Panel\International\User Profile System Backup\en-US" /v 0409:00020409 /t REG_DWORD /d 1 /f
reg delete "HKU\TEMP\Keyboard Layout\Preload" /va /f
reg add "HKU\TEMP\Keyboard Layout\Preload" /v 1 /t REG_SZ /d "00020409" /f
reg unload HKU\TEMP
I don't know what to add to remove the keyboard from the login screen as well...
 
Last edited:
To help others figure out the answer, what Windows language edition are you using? And the unattended locale settings?
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Control Panel\International]
"BlockUserInputMethodsForSignIn"=dword:00000001
 

Attachments

  • Windows 10 x64-2022-09-26-17-37-32.png
    Windows 10 x64-2022-09-26-17-37-32.png
    65.2 KB
  • Windows 10 x64-2022-09-26-17-53-35.png
    Windows 10 x64-2022-09-26-17-53-35.png
    308.5 KB
  • Windows 10 x64-2022-09-26-17-37-51.png
    Windows 10 x64-2022-09-26-17-37-51.png
    307.8 KB
A small addition for anyone reading this: the setupcomplete.cmd part in #3 only applies the locale settings to users. To apply the settings to the lock screen as well (especially noticeable when changing the time format), add this:

Code:
reg add "HKU\.DEFAULT\Control Panel\International" /v sTimeFormat /t REG_SZ /d "HH:mm:ss" /f
reg add "HKU\.DEFAULT\Control Panel\International" /v sShortTime /t REG_SZ /d "HH:mm" /f
reg add "HKU\.DEFAULT\Control Panel\International" /v iTime /t REG_SZ /d "1" /f
reg add "HKU\.DEFAULT\Control Panel\International\User Profile\en-US" /v 0409:00020409 /t REG_DWORD /d 1 /f
reg add "HKU\.DEFAULT\Control Panel\International\User Profile" /v InputMethodOverride /t REG_SZ /d "0409:00020409" /f
reg delete "HKU\.DEFAULT\Control Panel\International\User Profile System Backup\en-US" /va /f
reg add "HKU\.DEFAULT\Control Panel\International\User Profile System Backup\en-US" /v 0409:00020409 /t REG_DWORD /d 1 /f
reg delete "HKU\.DEFAULT\Keyboard Layout\Preload" /va /f
reg add "HKU\.DEFAULT\Keyboard Layout\Preload" /v 1 /t REG_SZ /d "00020409" /f

Tested on Windows 11 23H2
 
Back
Top