
Just last week, I was asked in a chat on the social networking site Facebook about the automation of some language settings when using Group Policy functionality. During that correspondence, I immediately replied that you can accomplish all the tasks you have set if you take advantage of the possibilities of Group Policy preferences and change specific registry settings. A person was interested in the following features: changing the input method with the default English language, as well as changing the switch layout to the familiar key combination Ctrl + Shift. Consequently, later in this article I will explain how this problem can be solved. You will also learn more about some of the little tricks related to language settings and group policy.
Determination of the required parameters
As is the case with most of the operating system settings for which there are no separate policy settings for existing administrative templates, in order to find the required settings, you can try to monitor the registry while changing the desired settings in the graphical interface. As I already wrote, the ideal tool for monitoring the registry is considered a utility written by Mark Russinovich - ProcessMonitor. In principle, in this case, the filters of this utility are simple. The most important thing is to select the rundll32.exe process and the RegSetValue operation, since using graphical methods, a dialog that allows you to change the keyboard shortcut when switching layouts is called from rundll32.exe, and the corresponding operation allows you to localize the changing parameters. After you turn on monitoring and change the keyboard shortcut, you will see that you will need to work with the registry key
[HKEY_CURRENT_USER \ Keyboard Layout \ Toggle] , and the parameters to be changed are
Hotkey ,
Language Hotkey and
Layout Hotkey . These are ordinary string parameters, and in our case their values โโshould be 2, 2 and 3, respectively. The resulting monitoring result can be seen in the following illustration:
Fig. 1. Monitoring the change keyboard shortcut switching layoutsThe first batch of parameters found - great! Now we need to find the parameters responsible for the language set in the default operating system. Here we can immediately divide this task into two subtasks. First of all, in operating systems, starting with Windows 8, there are two different parameters responsible for the order of languages. This is the parameter called โ
Override the default input method โ and the parameter โ
Primary language โ. With the first parameter, everything is more or less clear and transparent. It uses the same list of parameters that was in previous operating systems. In this case, it is not even necessary to perform any actions to monitor the system. It is enough in the registry editor to simply go from the
Toggle section to the
Preload section and look at the list of languages. Each language has a sequence number according to which it should be used. That is, the parameter number 1 will be located on the top in the corresponding drop-down list, and then the languages โโspecified in the parameters numbers 2, 3 and so on will go. The values โโof such parameters are indicated by the identification code of the language group. Since we are interested only in two languages โโ(I remind you that the code 409 is English, and 419 is Russian), therefore, the parameters should look like this:
[HKEY_CURRENT_USER \ Keyboard Layout \ Preload]"1" = "00000409""2" = "00000419"These parameters, as well as their display in the graphical interface, can be seen below:
')
Fig. 2. Define default input method parametersNow let's try to dig even deeper and see how the parameters change when the main language is selected on the
Change your language preferences page of the control panel. Here once again you will have to use the utility from Russinovich, since it is almost impossible to immediately determine the correct location of the parameters in the registry. By adding the filter operation
RegEnumValue and changing the corresponding setting, you can immediately come to the conclusion that the parameters of interest are located in the section
HKEY_CURRENT_USER \ Control Panel \ International \ User Profile . And you will need to change only one
multi-line parameter called
Languages . This parameter with its corresponding value is shown below:
Fig. 3. Search for a parameter to determine the primary languageIn principle, all the required parameters have already been found, but it is also desirable to determine the value of the last parameter responsible for saving the input language for opening applications. A little more detail about what this parameter is. The parameter โ
Let me choose the input method for each application โ (
Let me set a different input method for each app window ) allows you to save the selected input language for each application. The ability to use a single language for all applications (that is, the position of the control when the box is unchecked) appeared in Windows 8, and, by the way, this opportunity immediately found thousands of detractors who are trying to rid themselves of such suffering. It is for this reason that I recommend setting the current flag. Unfortunately, at this stage, localize the required parameters, i.e. I still haven't managed to do this with the help of the registry, so if someone has a solution, please write in the comments to this article.
You can proceed to the next step โ setting up the group policy preference items.
Configure Group Policy Preference Items
Since 6 different registry settings were found that need to be changed, you now need to create six separate registry preference items. And since the registry settings we use must be placed in different sections of the registry, for convenience, so-called collections will be created when creating preference items. But first things first.
- As usual, first you need to open the โ Group Policy Management โ snap-in ( Group Policy Management ) and create a new GPO, say โ Language Settings โ, then link it to the required department and open the GPME editor;
- In the displayed editor, go to the User Configuration \ Settings \ Windows Configuration \ Registry ( User Comfiguration \ Windows Settings \ Files ) node, where collections and preference items will be created. To create the first collection from the context menu of the details pane, select the Create command, and then the New> Collection Item , after which the name of such collection is simply determined. For example, in this example, two collections are created: โ Hot keys โ and โ Input Method โ;
- After that, the first registry preference item is created inside the Hot keys collection. Since this parameter is already present in the registry, in the Action drop-down list you should leave the default update action. All the parameters that are being changed today are in the HK_CURRENT_USER hive, therefore, the corresponding hive should be selected from the โ Hive โ drop-down list. All parameters from this collection will be placed in one section, so both for the current and for all subsequent preference items the same registry key is selected - Keyboard Layout \ Toggle . In this case, you can click on the browse button and select both the key and the registry parameter to be changed. It turns out, after the first parameter is selected, the โ Parameter name โ, โ Parameter type โ and โ Value โ fields will be automatically filled in ( Value name , Value type , Value data ). It remains only, if necessary, to change the value of the Hotkey parameter to 2, as shown in the following illustration, and then save all the changes:

Fig. 4. Creating the first preference item
- The following two parameters are created by copying and pasting: Language Hotkey and Layout Hotkey with values โโof 2 and 3;
- Going to the Input Method collection, you should create 2 registry preference items for the Keyboard Layout \ Preload section . As it was found earlier, these are ordinary string parameters " 1 " and " 2 " with values โโ00000409 and 00000419;
- The last preference item will be created in the root node of the registry. This will be the Control Panel \ International \ User Profile section. The parameter type here must be specified as REG_MULTI_SZ . The value of the Languages parameter should be as follows, without spaces or blank lines:
en-us
ru
The current policy setting dialog box is below:

Fig. 5. Creating a registry preference item with parameter type REG_MULTI_SZ
- After that, these parameters are applied only on Windows 8.1 operating systems (at least, in the case of the last parameter, targeting to the element level is highly desirable), you can either create the operating system element for the last element or for all elements in the targeting editor. and indicate that such parameters should be applied only if the client has Windows 8.1 installed;
- Ultimately, after creating the last, sixth, policy setting, your Group Policy Management Editor should look like this:

Fig. 6. Group Policy Management Editor after creating all items
After updating the Group Policy settings, you can verify that the settings in the browser and in the graphical user interface have been changed correctly. If all preference items were properly created, everything should be fine. However, remember that the policies you create allow you to change settings without blocking the user interface, which will allow your users to change these settings in the future as they wish. The only way to change everything once and for all is to write your own
administrative template .