How to Automate Regional and Language settings in Windows Vista, Windows Server 2008, Windows 7 and in Windows Server 2008 R2

Applies to: Windows Vista Home BasicWindows Vista Home Basic 64-bit EditionWindows Vista Home Premium More

Summary


This article describes the Regional and Language Settings options in Windows Vista, in Windows Server 2008, in Windows 7 and in Windows Server 2008 R2. Also, in this article you can find the method to modify the settings using an xml based answer file.

For more information on Windows Server 2003, click the following article number to view the article in the Microsoft Knowledge Base:

325856   How to specify regional and language settings for an unattended installation of Windows MultiLanguage Version in Windows Server 2003


Sample XML answer file

<gs:GlobalizationServices xmlns:gs="urn:longhornGlobalizationUnattend">

<!-- user list -->
<gs:UserList>
<gs:User UserID="Current" CopySettingsToDefaultUserAcct="true" CopySettingsToSystemAcct="true"/>
</gs:UserList>

<!-- GeoID -->
<gs:LocationPreferences>
<gs:GeoID Value="244"/>
</gs:LocationPreferences>

<gs:MUILanguagePreferences>
<gs:MUILanguage Value="cy-GB"/>
<gs:MUIFallback Value="en-GB"/>
</gs:MUILanguagePreferences>

<!-- system locale -->
<gs:SystemLocale Name="en-US"/>

<!-- input preferences -->
<gs:InputPreferences>
<gs:InputLanguageID Action="add" ID="0409:00000409"/>
<gs:InputLanguageID Action="remove" ID="0409:00000409"/>
</gs:InputPreferences>

<!-- user locale -->
<gs:UserLocale>
<gs:Locale Name="en-US" SetAsCurrent="true" ResetAllSettings="false">
<gs:Win32>
<gs:iCalendarType>1</gs:iCalendarType>
<gs:iCurrency>3</gs:iCurrency>
<gs:iCurrDigits>1</gs:iCurrDigits>
<gs:sList>...</gs:sList>
<gs:sDecimal>;;</gs:sDecimal>
<gs:sThousand>::</gs:sThousand>
<gs:sGrouping>1</gs:sGrouping>
<gs:iDigits>2</gs:iDigits>
<gs:iNegNumber>2</gs:iNegNumber>
<gs:sNegativeSign>(</gs:sNegativeSign>
<gs:sPositiveSign>=</gs:sPositiveSign>
<gs:sCurrency>kr</gs:sCurrency>
<gs:sMonDecimalSep>,,</gs:sMonDecimalSep>
<gs:sMonThousandSep>...</gs:sMonThousandSep>
<gs:sMonGrouping>3</gs:sMonGrouping>
<gs:iNegCurr>3</gs:iNegCurr>
<gs:iLZero>0</gs:iLZero>
<gs:sTimeFormat>:HH:m:s tt:</gs:sTimeFormat>
<gs:s1159>a.m.</gs:s1159>
<gs:s2359>p.m.</gs:s2359>
<gs:sShortDate>d/M/yy</gs:sShortDate>
<gs:sLongDate>dddd, MMMM yyyy</gs:sLongDate>
<gs:iFirstDayOfWeek>6</gs:iFirstDayOfWeek>
<gs:iFirstWeekOfYear>2</gs:iFirstWeekOfYear>
<gs:sNativeDigits>0246813579</gs:sNativeDigits>
<gs:iDigitSubstitution>1</gs:iDigitSubstitution>
<gs:iMeasure>0</gs:iMeasure>
<gs:iTwoDigitYearMax>2021</gs:iTwoDigitYearMax>
</gs:Win32>
</gs:Locale>
</gs:UserLocale>
</gs:GlobalizationServices>

Syntax


  • UserList - This setting specifies the user account for which we need to do the change settings. CopySettingsToDefaultUserAcct and CopySettingsToSystemAcct are the parameters that can be used to copy the settings to all users and also the system account(logonUI screen)
  • GeoID/Location Preferences - Updates the current location field under the location tab. Some software, including Windows may provide additional information passed on this, such as weather
  • MUILanguagePreference - Supports setting the display language and, if appropriate, the display language fallbacks for the system. Set by using a child element <gs:MUILanguage> with an attribute containing the language string.To set the fallback language of the language set using <gs:MUILanguage>, use the element <gs:MUIFallback>. Using this XML entity does NOT install the display languages. It should only be used for selecting display languages after they have been installed.
  • SystemLocale - This setting enables programs that do not use Unicode to run and display menus and dialog boxes in the localized language. If a localized program does not display correctly on the computer, setting the system locale to match the language of the localized program may resolve the problem. However, this setting is system-wide, so it is not possible to support simultaneously the localized programs that do not use Unicode for multiple languages.
  • InputPreferences - This setting specifies the input locale and keyboard layout combinations. Please Note: Unlike in 2003/XP, for some complex languages, the usage of KLIDs to identify keyboard layouts have been replaced by GUIDs. The following link gives a table for the replacement: http://blogs.msdn.com/b/michkap/archive/2009/09/15/9894707.aspx
  • UserLocale - This setting controls the settings for sorting numbers, time, currency, and dates.
To a use .xml answer file to set language preferences:

  1. Create an xml file with the required settings and save it as a file (eg: c:\unattend.xml). The .xml file should at minimum include the following:
    <gs:GlobalizationServices xmlns:gs="urn:longhornGlobalizationUnattend">
    <gs:UserList>
    <gs:User UserID="Current"/>
    </gs:UserList>
    </gs:GlobalizationServices>
  2. Create a batch file by using the following command line to apply the answer file settings:
    control.exe intl.cpl,,/f:"c:\Unattend.xml"

References


Guide to Windows Vista Multilingual User Interface
http://technet.microsoft.com/en-us/library/cc721887(WS.10).aspx