The Deployment Guys

Helping to deploy your world automagically...

Configuring Regional and Language Settings Online in an MDT Task Sequence

Configuring Regional and Language Settings Online in an MDT Task Sequence

  • Comments 37
  • Likes

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
http://support.microsoft.com/?id=289125

Windows Vista Command Line Configuration of International Settings
http://msdn.microsoft.com/en-ie/goglobal/bb964650(en-us).aspx

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.

Attachment: RegionalSettings.zip
  • 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?

    Regards,

    Renjith.

  • 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: http://blogs.technet.com/osd/archive/tags/Modena/default.aspx

    Michael Murgolo

  • 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.

    Thanks

  • 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:\Minint\SMSOSD\OSDLOGS or ZTI - C:\Windows\System32\CMM\Logs, C:\Windows\System32\CMM\Logs\Smstslog).

    Michael Murgolo

  • 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>

  • qb,

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

    Also, do you actually have the language pack installed?

    Michael Murgolo

  • Michael,

    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

    Thanks

  • 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

  • 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:\Lang\Japanese.xml"

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

    Michael Murgolo

  • Works like a charm! Thanks a bunch Michael

  • 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..!

  • smartie,

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

    Michael Murgolo

  • 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 O.S.ses.

    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

  • 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)

  • 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)

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment