How to setup Keyboard Layout based on Language selection at OOBE


ijalabs

Active member
Local time
7:16 AM
Posts
22
OS
Windows 11
Hi Experts,

I am working on creating a Windows image using DISM command for Windows 11 22H2. Once the image is created using Dism & using Dism i am reapplying the image to the pc & at the OOBE i am selecting Japanese for the region and completing the OOBE setup process.

If i go to the Keyboard layout option i am seeing by default it is set to 101/102 & i have to set this to 106/109 manually. is there a way we can set this based on Language selection at OOBE.

For example if i select English it has to be 101/102 and if i select Japanese it has to be 106/109 automatically without manual options.

Kindly suggest.

Thanks
Ijalab
 
Windows Build/Version
Windows 11 22H2

Attachments

  • Keyboard layout.JPG
    Keyboard layout.JPG
    14.4 KB · Views: 1

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP Z2 SFF G9
I am trying to make the changes using the below given PowerShell command. by using this command i am able to set the language to Japanese but still the Keyboard layout option is showing 101/102 not changed to 106/109.

$lang=(Get-WinSystemLocale).DisplayName

if ($lang -eq '日本語 (日本)')
{
$currentLangAndKeyboard = (Get-WinUserLanguageList).InputMethodTips
if ($currentLangAndKeyboard -eq "0409:00000409")
{
$langList = New-WinUserLanguageList en-US
$langList[0].InputMethodTips.Clear()
$langList[0].InputMethodTips.Add('{0411:{03B5835F-F03C-411B-9CE2-AA23E1171E36}{A76C93D9-5523-4E90-AAFA-4DB112F9AC76}}')
Set-WinUserLanguageList $langList -Force
}
Import-Module International
Set-WinUserLanguageList -LanguageList "ja-JP"
}
else
{
exit
}
Restart-Computer -Force
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP Z2 SFF G9
Maybe I am missing something, so apologies, but are you using an answer file?


In step 4 here it shows what is needed.

I know if you have any extra spaces inserted anywhere it can cause the whole thing to fail or do weird stuff.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom Built
    CPU
    Ryzen 7 5700 X3D
    Motherboard
    MSI MPG B550 GAMING PLUS
    Memory
    64 GB DDR4 3600mhz Gskill Ripjaws V
    Graphics Card(s)
    RTX 4070 Super , 12GB VRAM Asus EVO Overclock
    Monitor(s) Displays
    Gigabyte M27Q (rev. 2.0) 2560 x 1440 @ 170hz HDR
    Hard Drives
    2TB Samsung nvme ssd
    2TB XPG nvme ssd
    PSU
    CORSAIR RMx SHIFT Series™ RM750x 80 PLUS Gold Fully Modular ATX Power Supply
    Case
    CORSAIR 3500X ARGB Mid-Tower ATX PC Case – Black
    Cooling
    ID-COOLING FROSTFLOW X 240 CPU Water Cooler
    Internet Speed
    900mbps DOWN, 100mbps UP
  • Operating System
    Chrome OS
    Computer type
    Laptop
    Manufacturer/Model
    HP Chromebook
    CPU
    Intel Pentium Quad Core
    Memory
    4GB LPDDR4
    Monitor(s) Displays
    14 Inch HD SVA anti glare micro edge display
    Hard Drives
    64 GB emmc
Maybe I am missing something, so apologies, but are you using an answer file?
This can't be solved from the answer file, which doesn't handle this level of keyboard mapping.

Instead the script needs one registry change:
Code:
Set-ItemProperty 'registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters' -Name 'LayerDriver JPN' -Value 'kbd106.dll'
 

My Computer

System One

  • OS
    Windows 7
Thanks @garlin

I have only done unattended installs through kari's tutorial so I only know whats in there.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom Built
    CPU
    Ryzen 7 5700 X3D
    Motherboard
    MSI MPG B550 GAMING PLUS
    Memory
    64 GB DDR4 3600mhz Gskill Ripjaws V
    Graphics Card(s)
    RTX 4070 Super , 12GB VRAM Asus EVO Overclock
    Monitor(s) Displays
    Gigabyte M27Q (rev. 2.0) 2560 x 1440 @ 170hz HDR
    Hard Drives
    2TB Samsung nvme ssd
    2TB XPG nvme ssd
    PSU
    CORSAIR RMx SHIFT Series™ RM750x 80 PLUS Gold Fully Modular ATX Power Supply
    Case
    CORSAIR 3500X ARGB Mid-Tower ATX PC Case – Black
    Cooling
    ID-COOLING FROSTFLOW X 240 CPU Water Cooler
    Internet Speed
    900mbps DOWN, 100mbps UP
  • Operating System
    Chrome OS
    Computer type
    Laptop
    Manufacturer/Model
    HP Chromebook
    CPU
    Intel Pentium Quad Core
    Memory
    4GB LPDDR4
    Monitor(s) Displays
    14 Inch HD SVA anti glare micro edge display
    Hard Drives
    64 GB emmc
Something like this example goes beyond what "Microsoft-Windows-International-Core" can specify. However, you could embed the equivalent "reg add" RunSynchronousCommand inside a "specialize" pass.
 

My Computer

System One

  • OS
    Windows 7
Thanks Andrew,

I am using a PowerShell script to run once using the registry settings.

After first boot the script will check installed OS language then and makes the changes if the it condition is met.

Thanks i will have a check and see if answer file is working.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP Z2 SFF G9
This can't be solved from the answer file, which doesn't handle this level of keyboard mapping.

Instead the script needs one registry change:
Code:
Set-ItemProperty 'registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters' -Name 'LayerDriver JPN' -Value 'kbd106.dll'
Thanks Garlin,

I will have a check and make the changes to the script and see if this is fixing the issue.

i am using the PowerShell script and change it o exe using invoke ps2exe option and add it to run once registry, so when the pc boots up it will check the OS installed language and if the condition is met it has to change the keyboard layout.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP Z2 SFF G9
Back
Top Bottom