While doing refresh scenarios, its possible to have USMT set the current Keyboard settings for the existing users on the reinstalled OS. The problem however, is setting the same default keyboard settings for new users on that machine..

By default the Keyboard settings will be that of the reference image, so if the keyboard settings in the image is en-US/00000409 it will be so on the deployed machine, unless this is changed somehow ( E.g Unattend.xml, variable, Reg e.t.c)

In an XP to Win7 migration scenario (or 7 to 7), you could run a script, to pick up the current keyboard settings, assign the value to a ConfigMgr variable, and then add it to your unattend.xml before running the minisetup part of the deployment:

Her I one way to do this:

Run the following script from your TS, in the current OS part (Where you do the USMT stuff). The script picks up the Keyboard HEX from the currently logged on user, and assigns the value to the MDT variable KeyboardLocal.

Dim WshShell, regInputLocale, regUserLocale, regLocation

Set WshShell = WScript.CreateObject("WScript.Shell") 
Set env = CreateObject("Microsoft.SMS.TSEnvironment") 

'Set InputLocale - Used for setting keyboard 
regInputLocale = WshShell.RegRead("HKCU\Keyboard Layout\Preload\1") 
env("KeyboardLocale") = Right(regInputLocale, 4) & ":" & regInputLocale

Wscript.echo env("KeyboardLocale")

TS could look like this:


In the “Apply Windows Settings”  you must use an unattended file that defines the InputLocal setting


The Unattended file must at a minimum contain this info: (this is for x86)

1 <?xml version="1.0"?> 2 <unattend xmlns="urn:schemas-microsoft-com:unattend"> 3 <settings pass="oobeSystem"> 4 <component name="Microsoft-Windows-International-Core" language="neutral" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 5 <InputLocale></InputLocale> 6 </component> 7 </settings> 8 </unattend>

The reason for the InputLocale entrance, is so that we can modify this setting as needed. In this refresh scenario, the script added the local keyboard value to the variable KeyboardLocale. KeyboardLocale is an MDT variable, and once set, we can use the MDT script ZTIConfigure.wsf to actually make the change to the unattend.xml (further info here🙂

Note: In this guide we use the KeyboardLocale variable, with a script, in a refresh scenario, but I might as well be set on a collection, setting up all the machines deployed from that with that specific keyboard setting.

In order to make take advantage of ZTIConfigure.wsf, you need to integrate MDT into SCCM. and create a Toolkit package. (explained here).

Finally you must add the two steps “Use toolkit “ and the “Configure” step


The Configure Unattend step, is just a run command line step, that calls the ZTIConfigure.wsf from the Toolkit package, using the variable %ScriptRoot% that points to the scripts folder of the toolkit.

That’s it, minisetup and the Unattend.xml will take care of the rest.