How to change keyboard and region settings from command line .

If installed system has not national settings like time zone, keyboard type or currency configured by default during system installation, it must be done before user start complain on it . So it can be done via windows gui, and command line which is easier to repeat on each PC via GP or batch file.

Settings can be set by executing command line :

control.exe intl.cpl,,/f:”P:\IT\lang\localepl.xml”

where „P:\IT\lang\localepl.xml” is localization of the file which contains  code :

<gs:GlobalizationServices xmlns:gs="urn:longhornGlobalizationUnattend">
<gs:User UserID="Current" CopySettingsToDefaultUserAcct="true" CopySettingsToSystemAcct="true"/>
<!--Location Preferences-->
<gs:GeoID Value="191"/>
<!--pl-PL--><gs:InputLanguageID Action="add" ID="0415:00000415" Default="true"/>
<!--pl-PL--><gs:InputLanguageID Action="add" ID="0415:00000415"/>
<!-- user locale -->
  <gs:Locale Name="pl-PL" SetAsCurrent="true" ResetAllSettings="true"/>
<!-- system locale -->
<gs:SystemLocale Name="pl-PL" />

full description at:,-windows-server-2008,-windows-7-and-in-windows-server-2008-r2



I used there

<gs:GeoID Value="191"/>

Which belongs to PL  full list of codes fo other countries can be found at:

It will set timezone and currency for your country.

<!--pl-PL--><gs:InputLanguageID Action="add" ID="0415:00000415" Default="true"/>
<!--pl-PL--><gs:InputLanguageID Action="add" ID="0415:00000415"/>

Added polish programmers keyboard and configured it as default.

List available keyb codes for other countries at :

Please remember using this XML entity does NOT install the display languages. It should only be used for selecting display languages after they have been installed.

When you execute described command , logging  off user may be needed.

Leave a Reply

Twój adres email nie zostanie opublikowany. Pola, których wypełnienie jest wymagane, są oznaczone symbolem *