by Michael S. Kaplan, published on 2006/05/30 03:01 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2006/05/30/610505.aspx
In previous posts, I have talked about the unattend mode of Regional and Language Options.
And in the most recent of those, I promised to talk about the changes in Vista. So that is what is happening in this very post!
WARNING: The stuff covered here will not work in Windows prior to Vista....
Some of the exciting features that were added may be small items, but a few of them have been requested for a very very long time:
One of the big new changes, to go along with all of the changes to Vista's unattend during setup story in general, is a move to an XML file format rather than the old text file format used previously....
To run it, make sure you follow that advice I gave about control.exe, instead of rundll32.exe like that KB article suggests:
control.exe intl.cpl,,/f:"c:\Unattend.xml"
A sample of the XML file that should work in Beta 2 of Vista (and probably most other builds, this functionality has been in there for a while now!) can be seen below:
<gs:GlobalizationServices xmlns:gs="urn:longhornGlobalizationUnattend">
<!-- user list -->
<gs:UserList>
<gs:User UserID="Current" CopySettingsToDefaultUserAcct="true" CopySettingsToSystemAcct="true"/>
</gs:UserList><!-- GeoID -->
<gs:LocationPreferences>
<gs:GeoID Value="134"/>
</gs:LocationPreferences><!-- UI Language Prefernces -->
<gs:MUILanguagePreferences>
<gs:MUILanguage Value="cy-GB"/>
<gs:MUIFallback Value="en-GB"/>
</gs:MUILanguagePreferences><!-- system locale -->
<gs:SystemLocale Name="en-GB"/><!-- input preferences -->
<gs:InputPreferences>
<gs:InputLanguageID Action="add" ID="0409:00000409"/>
<gs:InputLanguageID Action="remove" ID="0409:00000409"/>
<!--bs-Latn-BA--><gs:InputLanguageID Action="add" ID="141a:0000041a"/>
<!--cy-GB--><gs:InputLanguageID Action="add" ID="0452:00000452"/>
<!--cy-GB--><gs:InputLanguageID Action="add" ID="0809:00000809"/>
</gs:InputPreferences><!-- user locale -->
<gs:UserLocale>
<gs:Locale Name="en-US" SetAsCurrent="true" ResetAllSettings="false">
<gs:Win32>
<gs:iCalendarType>1</gs:iCalendarType>
<gs:sList>...</gs:sList>
<gs:sDecimal>;;</gs:sDecimal>
<gs:sThousand>::</gs:sThousand>
<gs:sGrouping>1</gs:sGrouping>
<gs:iDigits>2</gs:iDigits>
<gs:iNegNumber>2</gs:iNegNumber>
<gs:sNegativeSign>(</gs:sNegativeSign>
<gs:sPositiveSign>=</gs:sPositiveSign>
<gs:sCurrency>kr</gs:sCurrency>
<gs:sMonDecimalSep>,,</gs:sMonDecimalSep>
<gs:sMonThousandSep>...</gs:sMonThousandSep>
<gs:sMonGrouping>3</gs:sMonGrouping>
<gs:iCurrDigits>1</gs:iCurrDigits>
<gs:iCurrency>3</gs:iCurrency>
<gs:iNegCurr>3</gs:iNegCurr>
<gs:iLZero>0</gs:iLZero>
<gs:sTimeFormat>:HH:m:s tt:</gs:sTimeFormat>
<gs:s1159>a.m.</gs:s1159>
<gs:s2359>p.m.</gs:s2359>
<gs:sShortDate>d/M/yy</gs:sShortDate>
<gs:sLongDate>dddd, MMMM yyyy</gs:sLongDate>
<gs:iFirstDayOfWeek>6</gs:iFirstDayOfWeek>
<gs:iFirstWeekOfYear>2</gs:iFirstWeekOfYear>
<gs:sNativeDigits>0246813579</gs:sNativeDigits>
<gs:iDigitSubstitution>1</gs:iDigitSubstitution>
<gs:iMeasure>0</gs:iMeasure>
<gs:iTwoDigitYearMax>2021</gs:iTwoDigitYearMax>
</gs:Win32>
</gs:Locale>
</gs:UserLocale></gs:GlobalizationServices>
Note the use of comments in the XML. :-)
Now as was true in the old format, you only have to include the sections that you have changes in. However, at a minimum you must always have the following skeleton:
<gs:GlobalizationServices xmlns:gs="urn:longhornGlobalizationUnattend">
<!-- user list -->
<gs:UserList>
<gs:User UserID="Current"/>
</gs:UserList>
</gs:GlobalizationServices>
WARNING: Since I am a person who did not look at the event log when I could not get a file to work, you can save yourself a lot of time if you don't forget to add that "gs:UserList" tag!
Anticipating another question -- at present only the "Current" user is supported.
But don't worry. Think of this as another one of those instances where potential features in future versions are poking their heads out for people to gawk at! :-)
Now of course if anything changes between now and Vista shipping I will post again with whatever the updates are....
Anticpating another response -- the current plan of record is that the old text files will have to be converted to the new format, though of course that is a bigger issue than just Regional and Language Options -- it affects the unattend files for all of Vista. But I'll keep you updated on this issue if I hear anything else.
Now I am sure there are things I am forgetting, but I will make sure to add those in the future, too. :-)
This post brought to you by "ᠽ" (U+183d, a.k.a. MONGOLIAN LETTER ZA)
# Rune on 31 May 2006 2:23 PM:
# Michael S. Kaplan on 14 Jul 2006 2:19 PM:
# Ryan Hamshire on 19 May 2008 8:01 PM:
Question! I see that sort order is not one of the options under user locale, which makes sense because sort order is not a parameter, but attached to LCID. However, it seems that user locale is determined by NAME in this example, so I'm stumped trying to figure out how to create an unattend answer file like this one where I specify that I want, for example, the alternative Japanese sorting mechanism. Can I somehow specify the locale I want by LCID instead of NAME? -RH
# Wim Thomaere on 8 Sep 2008 7:35 AM:
Hey there,
I seem to have a problem with the value of <gs:sCurrency>kr</gs:sCurrency>
i whant to change it to the € sign. But when i check my settings he gives an error on /gs:sCurrency> . (I checked this with Internet Explorer and also had an error in eventvwr).
I am trying this on a vista machine with SP1.
Tatiana on 24 Jul 2009 7:32 PM:
Is it possible to set the default input method to the language pack's defaults?
The "defaults" are described here - http://technet.microsoft.com/en-us/library/cc766191(WS.10).aspx
However, I find it that, once I installed & applied the ru-RU language pack with the following XML, the default keyboard layout was still English. Russian was enalbed, so that's halfway there.
<gs:GlobalizationServices xmlns:gs=\"urn:longhornGlobalizationUnattend\">
<gs:UserList>
<gs:User UserID=\"Current\" CopySettingsToDefaultUserAcct=\"true\" CopySettingsToSystemAcct=\"true\"/>
</gs:UserList>;
<gs:MUILanguagePreferences>
<gs:MUILanguage Value=\"" + sLLCC + "\"/>
</gs:MUILanguagePreferences>;
<gs:UserLocale>
<gs:Locale Name=\"" + sLLCC + "\" SetAsCurrent=\"true\" ResetAllSettings=\"false\"/>
</gs:UserLocale>
<gs:SystemLocale Name=\"" + sLLCC + "\"/>
</gs:GlobalizationServices>
Tatiana on 24 Jul 2009 7:35 PM:
And the reason I don't want to specify the input method by providing the InputMethodID value is because:
1) I don't want to keep a list of IDs for each language pack language myself
2) I don't know what to plug in for an IME
Michael S. Kaplan on 25 Jul 2009 12:17 PM:
There is no way to change the default of a language pack, and intl.cpl has no mechanism itself to run code to process the XML file you specify there -- so it will fail if you pass it straight in....
For IMEs you just need the Guids for the given IME.
Amit on 14 Mar 2011 6:50 AM:
Hi Micheal,
Can you please suggest how to do this same thing in Windows Server 2008 R2.???
I wanted to get Unattended file for Regional and Language Options in Windows Server 2008 R2, But I could not find.
Can you please help?
EPoole on 24 Jun 2013 2:47 PM:
Could you give any suggestion on how to adapt this script to Windows 8? Given that there is now a separate Language control panel applet, obviously the original fails to do anything.
control /name Microsoft.Language will open the correct one, but trying to pass an .xml file containing the keyboard IDs to it via /f and the path yields no results. Is this no longer possible in Windows 8?
referenced by
2008/05/20 That would be "Full Service" unattend
2007/07/30 Vista Int'l settings via the command line!