Set default keyboard settings based on Running OS

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.

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)

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.

By | 2011-06-02T20:51:33+00:00 June 2nd, 2011|OS Deployment|2 Comments

About the Author:

Michael Petersen
Twitter: @OSDeployLinkedin: Michael PetersenMicrosoft Community Contributor


  1. Charla December 23, 2016 at 10:32 - Reply

    Hi Chitrsine! It was great reading your interview. I have done a little research, but I'm not quite at the agent point yet. I've heard that agents are usually very kind while many authors are usually very nervous and freaked out to pitch, so this was a great interview to show how nice you are! 😉 Thank you!

  2. http://www./ February 3, 2017 at 5:32 - Reply

    The android OS is just not anchored to the Android App store. There are many different places to get apps on the internet, and can reach beyond the powers off the apps on the app store.

Leave A Comment