Configuring Regional and Language Settings Online in an MDT Task Sequence

Update 2015-02-27:  I have updated the script.  Read about the changes here:  Both posts now have the updated script download.

I had a customer who wanted to install the operating system language packs as a dynamic online application installation in the ConfigMgr task sequence based on the region where the client was deployed.  Because of this, they wanted to change the locale settings (UI language, keyboard layout, etc.) dynamically after the language pack was installed.

MDT has the properties UserLocale, SystemLocale (XP/2003), InputLocale (XP/2003), KeyboardLocale (Vista and higher), and UILanguage for configuring locale settings.  (Note that SystemLocale is only a standard property in MDT 2010 and later.  SystemLocale must be added as a custom property for versions of MDT before 2010.)  However, these are only used by MDT to configure these settings in the answer file (Sysprep.inf or Unattend.xml) offline when the operating system image is applied.

To configure these settings online requires using a control panel command with a special answer file that just has locale settings.  These are documented here for Window XP/2003 and Windows Vista and higher:

How to create the regional and language settings for an unattended installation of Windows MultiLanguage Version

Windows Vista Command Line Configuration of International Settings

So I created the attached script for Windows XP and Windows Vista to run after the MUI Pack install.  I put this script together right at the end of the engagement (last minute customer request) so it did not get much testing.  I haven’t tried it with Windows 7 but it should work since XML file used should be the same as Windows Vista.  If you encounter problems, please post comments.

This script uses the MDT Properties above and a custom property called GeoID (Vista and higher) to create the appropriate XML or INF settings file (named RegionalOptions.log) and then runs the appropriate command with intl.cpl.  (If SystemLocale is not specified, then the value of UserLocale is used for that.)  You could expand this script to handle other settings using the references links found above.

Disclaimer: The information on this site is provided "AS IS" with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the Terms of Use.

This post was contributed by Michael Murgolo, a Senior Consultant with Microsoft Services - U.S. East Region.

Comments (38)
  1. Denniz says:

    Hi Michael,

    I tried to disable the redirection of 64 bit file system, but it did not work anyway.

    My command line looks like this: cscript.exe %deployroot%ScriptsRegionalSettings.wsf

    I have also tried: %windir%sysnativeCscript.exe %deployroot%ScriptsRegionalSettings.wsf, but that did not work.

    Any ideas?


  2. Denniz,

    This is likely occurring due to file system redirection on Windows x64 (…/aa384187(v=VS.85).aspx).  Since the ConfigMgr Task Sequencer
    is 32-bit, the version of cscript.exe (and hence control.exe launched by the script) will be the 32-bit version.  This version may not work.  Try disabling 64-bit file system redirection for that Task Sequence step (…/bb632992.aspx).

    Michael Murgolo

  3. Anonymous says:

    Hi Michael,

    i tried to found out wahts the right command for this

    control intl.cpl,, /f:"filename.xml"

    under a Windows 8 Environment.

    What i found was the new command line for calling the Language Control Applet:

    control /name Microsoft.Language

    But then the two problems: What command line option to use? (i tried the old one but no success)

    Is the schema XML format still the same or also changed?

    Thank you for your help.

  4. Denniz says:

    Hi Michael,

    I am now using your script and it works just fine with Windows 7 x86, but when I am running it in a task sequence that installs Windows 7 x64 it don't!

    Do I have to make something else to get it to work with x64 Windows?



  5. Filipe,

    Are you running this from an elevated command prompt?  Is the file "C:MININTSMSOSDOSDLOGSRegionalOptions.log" being created and does the contents look like valid XML?

    Check the event log per the instructions in the Logging section of Vista link in the post above.

    You could also try running the command directly.  Without deleting the C:MININT folder (so that the file "C:MININTSMSOSDOSDLOGSRegionalOptions.log" remains there) try running the command directly in an elevated command prompt.

        control.exe intl.cpl,,/f:"C:MININTSMSOSDOSDLOGSRegionalOptions.log"

    Michael Murgolo

  6. Anonymous says:

    Hei Michael,

    The script is missing an oFile.Close after it is done writing the xml file for Windows Vista/7. That is why it returns a code 1.

           oFile.WriteLine "</gs:GlobalizationServices>"

    —ADD THIS LINE—- oFile.Close

    sCmd = "cmd /c control.exe intl.cpl,,/f:" & chr(34) & sFile & Chr(34)

  7. Anonymous says:

    Hi Michael,

    I'm using the control.exe intl.cpl to set the language during the user deployment in a task sequence. The problem that I got is, that the local account NT-AUTORITHY is renamed to NT-AUTORITÄT which the causes an error during SQL server installation. OS is Vista, Language in de-DE. Do you have any idea how to modify the xml file to not rename this account but have a German user interface for all new users?

    Thanks in advance



  8. Denniz says:

    Hi Michael!

    I have tried your script in my SCCM environment and it always fails with an error that it cannot change UI Language to sv-SE!

    First I install the Windows 7 language pack as a ConfigMgr Package andt it gets installed ok.

    Then I want to change the Default Display Language with your script.

    I have tried to run it as both:

    – Run Commandline in my TS right after "Install Software" in the Restore Phase

    – I have also tried to create a ConfigMgr software package with the script and a copy of ZTIUtility.vbs

    the command i use is: cscript //nologo RegionalSettings.wsf /UserLocale:sv-SE /SystemLocale:sv-SE /KeyboardLocale:"041d:0000041d;0409:00000409" /UILanguage:sv-SE /GeoID:221

    It always fails with error 1. The event log says it cannot change the UI Language to sv-SE.

    Is it important where in the TS I put the script or is there problem with the credentials that the TS uses (SYSTEM) cannot change the UI Language?

    Im kind a stuck here and desperate for mor information on how this script should be used.

    Kind Regards


  9. smartie,

    Yes, you can create your own XML file and run it directly with control.exe.

    Michael Murgolo

  10. Thanks BH and imp0z for pointing out that bug.  I’ve attached an updated version with you fix.

    Michael Murgolo

  11. qb,

    You were not clear if the sample you provided works or not.

    Also, do you actually have the language pack installed?

    Michael Murgolo

  12. Hi Ramon,

    I think I know what the problem is.  The link to GeoID values above used to be listed in decimal not hex.  The samples on the Windows Vista Command Line Configuration of International Settings page and my script expect decimal values.  Try converting to decimal (e.g. try 223 for Switzerland instead of 0xDF).

    Michael Murgolo

  13. Ren,

    There is nothing “in-the-box” in Configuration Manager or MDT for prompting a user during ZTI.  However, the Configuration Manager Team is working on a tool set called Modena to allow for prompting the user for some items.  You can find information on these here:

    Michael Murgolo

  14. Denniz,

    Try placing a restart between the language pack install and the execution of the script.  See if that helps.

    Michael Murgolo

  15. qb,

    Very interesting.  I’m going to pass this along internally and see if I can get confirmation that this should work for Windows 7.

    Thanks for letting me know.

    Michael Murgolo

  16. Robin Hearne,

    You did not state how you are running the command when it fails.  How are you kicking off the command if it is not on the local PC?

    Michael Murgolo

  17. Anonymous says:

    Hello Michael. Thanks for the script, it’s just what I needed to deploy 10 language versions of winodws 7. I use SCCM and OSD to deploy

    A problem I have is:

    I use an image with all languages imported in it, and it keeps coming up with the language choice option even though the TS runs succesfully.

    Also, the task step itself returns a return code 1 in the regionalsettings.log, but is  run it after the TS finishes, it does work fine.

    My question: If I use this script in OSD in SCCM, at what point in the task sequence should I put this task.

    Thanks in advance,

    Michel van den Berg

  18. qb,

    I finally got some feedback on this.  Supposedly the scheme has not changed for Windows 7.  But there appears to be a bug where the command line does not work unless the path to file is quoted (even if there are no spaces in the path) and the full path to the file is specified.  Like this:

    control intl.cpl,, /f:"C:LangJapanese.xml"

    Give that a try and let us know if that works.

    Michael Murgolo

  19. qb,

    This script is designed to be used with MDT.  It requires ZTIUtility.vbs to be in the same folder to work (put the script in the MDT "Scripts" folder) and all the MDT properties I mentioned populated.  Did you do this?  Running the command by itself will do nothing.  A Gather step must run in the task sequence before this is run.

    Did the script generate any logs (RegionalSettings.log or RegionalOptions) where the MDT logs are created (LTI – C:MinintSMSOSDOSDLOGS or ZTI – C:WindowsSystem32CMMLogs, C:WindowsSystem32CMMLogsSmstslog).

    Michael Murgolo

  20. REN4 says:

    Hi Michael,

     Thanks for this posting.

      Can you please let me know how can i achieve below items.

    I am using MDT intagrated with SCCM to install XP+Sp2 via ZTI.

       In my scenario customer wants the installation to be get stopped at two location

    1) Regional Settings

    2) Computer Name

    After giving the proper regional settings and computer name, installation should proceed. Can you please suggest how can i achieve this in ZTI.

     Where should i modify for this?



  21. qb says:

    Hi Michael,

    This didn’t work for Windows 7. Even I tried running the command in OS didn’t make any difference. It doesn’t give any error messages or output. I guess command silently fails even if something is wrong.


  22. qb says:

    Hi Michael,

    Sorry I wasn’t clear enough. Your script runs with no problems. The log files get created and the TS step exits out with no failure.

    The command that I am reffering to is control intl.cpl,, /f:"filename.xml". I am not sure if the syntax has changed from Vista to Windows 7. Here is the sample xml that I use for changing the UIlanguage.

    <gs:GlobalizationServices xmlns:gs="urn:longhornGlobalizationUnattend">  <!–User List–> <gs:UserList> <gs:User UserID="Current"/> </gs:UserList>  <!—Display Language–>  <gs:MUILanguagePreferences>  <gs:MUILanguage Value="fr-FR" />  <gs:MUIFallback Value="en-US" /> </gs:MUILanguagePreferences>  </gs:GlobalizationServices>

  23. qb says:


    I do have the language pack installed. I just tested on Vista and sample XML file that I posted earlier, in fact, changed the UI language. Still no luck on Windows 7


  24. qb says:

    Works like a charm! Thanks a bunch Michael

  25. smartie says:

    Hi Michael,

    Can I directly create the XML file and run it on online Windows 7 image? I have a customer with windows 7 installed and MUI (Danish) installed. I want to set the UI language to Danish in automatic way.

    Can I create a XML file, like below and run directly using the control intl.cpl command?

    <gs:GlobalizationServices xmlns:gs=”urn:longhornGlobalizationUnattend”>  <!–User List–> <gs:UserList> <gs:User UserID=”Current”/> </gs:UserList>  <!—Display Language–>  <gs:MUILanguagePreferences>  <gs:MUILanguage Value=”da-DK” />  <gs:MUIFallback Value=”en-US” /> </gs:MUILanguagePreferences>  </gs:GlobalizationServices>

    I want to apply the MUI for system and all user accounts.  Please help.. I read that the code works through MDT, but ca we use it post installation of windows 7 to configure preferred MUI..

    Thanks in advance for your help..!

  26. BH says:

    Hei Michael Murgolo,

    For the problems getting this to work on Win7/Vista the xml file needs to be closed before running it with intl.cpl.

    You are missing an oFile.Close before running the command. Add that and the script will work fine:

           oFile.WriteLine "</gs:GlobalizationServices>"

    —Here you need oFile.Close

    sCmd = "cmd /c control.exe intl.cpl,,/f:" & chr(34) & sFile & Chr(34)

  27. Robin Hearne says:

    I don't have MDT in my environment so I'm trying to set the regional settings using a pre-prepared XML file simply by running the following command:

    control.exe c:windowssyswow64intl.cpl,, /f:"c:tempEnglish.xml"

    However it fails with exit code 1.

    The same command works fine if I run it locally on the PC.  Any ideas what I need to do to get this to work?



  28. Robin Hearne says:


    I started off by running the command as a 'Run Command Line' action in the Task Sequence and specifying a package which contained the English.xml file.  Since then I've tried every different way I could think of to run the command in a Task Sequence and even in an Advertisement but it always returns the same error.

    The command line I gave in my first post reflects my last attempt, which was to copy the file to the local temp folder and then excute the command in the Task Sequence.



  29. Jeff - Dell says:

    Thanks for the posting!!! This is exactly what I needed to complete a LTI interface that needed to set regional settings in the SCCM ZTI process. I have seperated the inis to look like ja-JP.ini, es-es.ini, etc, etc.. and put the corressponding regional settings. I call to each setting via the task sequence using the cscript provided. You are the man!


  30. Filipe says:

    I'm trying to run your script from a local directory, i've copied the files Regionalsettings.wsf and ZTIUtility.vbs.

    Then i've run the command:

    cscript //nologo RegionalSettings.wsf /UserLocale:es-VE /SystemLocale:es-VE /KeyboardLocale:"200a:0000200a;0409:000000409" /UILanguage:es-VE /GeoID:249

    The script is returning "ERROR running command "cmd /c control.exe intl.cpl,,/f:"C:MININTSMSOSDOSDLOGSRegionalOptions.log" , rc = 1

    Am i doing anything wrong?


  31. Ramon says:

    Hi Michael

    I need so a script for Windows 7 Multilingual. I tried to run your script but i was not able to change the UILanguage. I should change the langauge from english, german and french

    Could you help me to solve this? I need to change the languages with a command line.



  32. Ramon says:

    Hi Michael

    In my Windows7 Multilingual with german and french language package installed i tried the folllowing syntax.

    script //nologo RegionalSettings.wsf /UserLocale:de-CH /SystemLocale:de-CH /KeyboardLocale:"0807:00000807;0807:00000807" /UILanguage:de-DE GeoID:0xDF

    Unfortunatelly UILanguage didn't change to german. Why this? And i don't know if 0xDF is the correct GeoID. Where can i find the correct GeoID for Switzerland?



  33. Fashion Jewelry says:

    there will be a large amount of event logs for each Server.  This Task is scheduled on every day.  To verify each servers last event log would be a long process.

    Caddy Angelica Author

    follow me :

  34. Michael,

    Is there a limit to the number of input locals you can select and still have it work properly?

  35. Todd says:


    I have machines where all the Region and Language settings have been changed to Canadian.

    I have managed to use your examples to change every feature with the exception of one.

    Where I am running into problems is with the removal of the "English(Canada)" Input keyboard.

    It the following additional language listed below it "US", "Canadian Multilingual Standard", and "Canadian French". I have the following lines added to remove theses keyboards and add "English(US)" keyboard:

    <gs:InputLanguageID Action="remove" ID="1009:00001009"/>

    <gs:InputLanguageID Action="remove" ID="11009:00011009"/>

    <gs:InputLanguageID Action="remove" ID="0409:00000409"/>

    <gs:InputLanguageID Action="add" ID="0409:00000409" Default="true"/>

    I get an error when using "11009" for the "Canadian Multilingual Standard", it says it doesn't match its regular expression. Any ideas where I might be going wrong?

  36. saravanan says:

    Hi Michael,

    I wanted to modify the data and time formats of the system (as per my wish) at the end of COEM installation. For that i have created an .xml file that specifies what would be the format of short date and long date etc…

    and also i read that the command to execute is "control intl.cpl,, /f:"filename.xml". The question is, how to hook this command in answer file (or unattended.xml), so that after the OS installation this hook is triggered and data and time format will be changed as per my need.

    Thank you



  37. kannan says:

    Michael, Please help me on this ( Basically i wanted to create a customesetting.ini file for MOE Regionalisation ,which should be Contains the Regional settings including Proxy, DNS Suffix, Locales, Time Zones, language packs, etc. Also gives details about
    the GPOs and Logon scripts that needs to be carried forward to the Win7 environment. This needs to be implemented.) how to create custom.ini file for this need ??

  38. Anonymous says:

    A few years ago I authored a post about this topic. You can find it here . I recently had an engagement

Comments are closed.

Skip to main content