How to Set the Keyboard Layout through Group Policy (GPO)

How to Set the Keyboard Layout through Group Policy (GPO)

First we create an .ADM template for Group Policy. Here is example for setting the Keyboard Layout with two Languages, English and Farsi (you can add more Language).

Here is Keyboard_Layout.adm sample:

**************************************************************

CLASS USER

   CATEGORY "Keyboard Layout"

     POLICY "Keyboard Layout switching"

     KEYNAME "Software\Microsoft\Windows\CurrentVersion\Run"

       VALUENAME "internat.exe"

       VALUEON "internat.exe"

       VALUEOFF DELETE

       END POLICY

     

     POLICY "Keyboard layout"

     KEYNAME "Keyboard Layout\Preload"

         PART "Enable Englisch" CHECKBOX

           DEFCHECKED

          VALUENAME "1"

           VALUEON "00000409"

           VALUEOFF DELETE

         END PART

 

         PART "Enable Farsi" CHECKBOX

           DEFCHECKED

          VALUENAME "2"

           VALUEON "00000429"

           VALUEOFF DELETE

         END PART

 

         END POLICY

END CATEGORY



**************************************************************


Now, maybe you ask me, what is "internat.exe"?

"internat.exe" runs at startup; it loads the different input locales that are specified by the user. The schemas to be loaded for the current user are taken from the following registry key:

HKEY_CURRENT_USER\Keyboard Layout\Preload
http://www.neuber.com/taskmanager/deutsch/prozess/internat.exe.html 

"internat.exe" loads the "EN" in the system tray icon, so that the user can easily modify the schema. This icon disappears when the process exits, but the schema can be changed still through the control panel.

Note:
Keep in mind,
internat.exe was for old Windows, such as Windows 2000. For Windows XP and later, Preload is enough. You can find information in KB263201:

Default Processes in Windows 2000

Here is the codes and countries table:
 

Code

Country

00000402

Bulgarian

0000041a

Croatian

00000405

Czech

00000406

Danish

00000413

Dutch (Standard)

00000813

Dutch (Belgian)

00000409

English (United States)

00000809

English (United Kingdom)

00001009

English (Canadian)

00001409

English (New Zealand)

00000c09

English (Australian)

00000429

Farsi/Persian (Iran)

0000040b

Finnish

0000040c

French (Standard)

0000080c

French (Belgian)

0000100c

French (Swiss)

00000c0c

French (Canadian)

00000407

German (Standard)

00000807

German (Swiss)

00000c07

German (Austrian)

00000408

Greek

0000040e

Hungarian

0000040f

Icelandic

00001809

English (Irish)

00000410

Italian (Standard)

00000810

Italian (Swiss)

00000414

Norwegian (Bokmal)

00000814

Norwegian (Nynorsk)

00000415

Polish

00000816

Portuguese (Standard)

00000416

Portuguese (Brazilian)

00000418

Romanian

00000419

Russian

0000041b

Slovak

00000424

Slovenian

0000080a

Spanish (Mexican)

0000040a

Spanish (Traditional Sort)

00000c0a

Spanish (Modern Sort)

0000041d

Swedish

0000041f

Turkish

You can find some codes in this registry address:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes



Add this Keyboard_Layout.adm template file to the existing Administrative Templates section in GPO.

Now, you can see this new setting:











If you need .ADMX and .ADML, you can use the ADMX Migrator tool and convert an .ADM file to .ADMX and .ADML files.

Download ADMX Migrator


Some Information about three subkeys in HKEY_CURRENT_USER\Keyboard Layout:

Preload: This subkey contains the ID of each keyboard layout the user chooses through the Regional And Language Options dialog box. The name of the entry is a decimal number, and the sequence of those numbers begins at 1. The entry named 1 identifies the user's default/standard layout.




Substitutes: The Substitutes subkey stores the codes of alternative keyboard layouts that the user prefers. The system checks the user's Substitutes subkey when loading the keyboard layout, and if a substitute is specified, the corresponding layout is substituted for the default layout. The Substitutes key has no entries unless the user has selected a substitute keyboard layout.




Toggle: The Toggle subkey determines which key sequences can be used to toggle between input locales.

Value

Meaning

1

Key Sequence enabled; use LEFT ALT+SHIFT to switch between locales.

2

Key Sequence enabled; use CTRL+SHIFT to switch between locales.

3

Key Sequences disabled.

4

If the default locale is Thai, the accent grave key toggles input locales; otherwise key sequences are disabled.


Sometimes you need change this settings via command line. For Windows Vista or later, you can use .XML file with command. For more information read this link (section =>Example: Change Keyboards):

Windows Vista Command Line Configuration of International Settings



Sort by: Published Date | Most Recent | Most Useful
Comments
  • Really good article, I used in the past a ugly method for the KB's layout.. like, importing a .reg ([HKEY_CURRENT_USER\Keyboard Layout\Preload]) and a login script that simulate a regionnal setting's change, like that rundll32.exe shell32,Control_RunDLL intl.cpl,,/f:"c:\local.txt".. so alot more good your method :)

  • Thanks Yagmoth555

    Glad to hear :)

Page 1 of 1 (2 items)