Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Incorrect locale setting when you deploy a Windows 7 image by using SCCM 2007, MDT 2010, or MDT 2012


View products that this article applies to.

Symptoms

Consider the following scenario:

  • You deploy a Windows 7 image by using one of the following applications:

    • Microsoft System Center Configuration Manager 2007 (SCCM 2007)
    • Microsoft Deployment Toolkit 2010 (MDT 2010)
    • Microsoft Deployment Toolkit 2012 (MDT 2012)
  • The default system locale setting is changed.
  • The locale name (for example, sv-SE) is set correctly. However, the locale code in the registry remains set to 00000409 (en-US).
In this scenario, some applications display incorrect characters or languages. For example, in the example in the last bullet point, the page setup in Microsoft Paint remains set to U.S. (inches) instead changing to Metric (millimeters).

↑ Back to the top


Cause

In some RUNAS/Impersonation scenarios, the LocaleName and Locale registry values are not in sync in Windows 7. For example, this may occur with an operating system deployment in System Center Configuration Manager 2007 when the deployment is run as a local system. 

↑ Back to the top


Resolution

Method 1

To resolve this issue, add a step to either the System Center Configuration Manager or Microsoft Deployment Toolkit task sequence to change the Locale value of the Default User profile (ntuser.dat) by using a batch file that is located in the machine build. This value is located in the following registry key:

HKEY_USERS\ntuser.dat\Control Panel\International

For example, follow these steps:

  1. Create a command file in C:\Temp that is called "SetLocale.cmd."
  2. Copy and paste the following text into the new file, and then save the file:

    reg load HKU\ntuser.dat c:\users\default\ntuser.dat 

    reg import locale.reg

    reg unload HKU\ntuser.dat
  3. Create a new file in C:\Temp that is called "Locale.reg"
  4. Copy the following text into the new file, and then save the file:

    ======= 

    Windows Registry Editor Version 5.00

    HKEY_USERS\ntuser.dat\Control Panel\International]

    "Locale"="0000041D"

    =======
  5. Add "C:\temp\SetLocale.cmd" as a new entry in the task sequence.

    Note For MDT you will have to add it to the StateRestore phase.

Method 2 (for System Center Configuration Manager)

  1. In system Center Configuration Manager, create a package. For example, create a package that is named "Unattend XML Scripts."
  2. Create an Unattend.xml file that has the correct international settings in the Specialize and OOBE settings, and then save the file in the Package source folder. An example for Windows 7 x86 (32-bit) is as follows:

    <?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="specialize">
    <component name="Microsoft-Windows-International-Core" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <InputLocale>0809:00000809</InputLocale>
    <SystemLocale>en-GB</SystemLocale>
    <UILanguage>en-GB</UILanguage>
    <UserLocale>en-GB</UserLocale>
    </component>
    </settings>
    <settings pass="oobeSystem">
    <component name="Microsoft-Windows-International-Core" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <InputLocale>0809:00000809</InputLocale>
    <SystemLocale>en-GB</SystemLocale>
    <UILanguage>en-GB</UILanguage>
    <UserLocale>en-GB</UserLocale>
    </component>
    </settings>
    </unattend>
  3. In the SCCM OSD task sequence, on the "Apply Operating System" task, set to "Use and unattended or Sysprep answer file for a custom installation," select the package above, and then type the name of the XML. For examply, type Unattend.xml.

↑ Back to the top


Keywords: kb

↑ Back to the top

Article Info
Article ID : 2625165
Revision : 2
Created on : 3/27/2020
Published on : 3/27/2020
Exists online : False
Views : 607