OS: Windows 7 64-bit

I have a machine that has had it's "Region and Language" settings all set to "Canada". What I need to do is change all those settings to revert back to the default of "United States". The tricky thing is that I would like to create a script that can do this as I expect to run into more machines with this issue. I don't want to have to manually modify through the GUI on every machine.

On the following tabs I need to do....

Region and Language (Format)-
where it says "Format" I need that changed to "English (United States)"

Region and Language (Location)-
I need "Current Location" set to "United States"

Region and Language - Text Services and Input Language (General)-
I need to delete all other keyboard language except for "English (United States) - US"

Region and Language (Administrative)-
Here I believe that "non-Unicode programs" will also have to be set to "English (United States)"

(Sorry I had screenshots for all of the above but I am not allowed to post them)

So far what I have found is this from Microsoft that shows you an xml file that can be created to modify the settings above

Problem is that the only xml example from the link that appears to be working properly is the one for adding and setting a keyboard language as default. I have tried some of the other examples but they do not appear to be working. (working example - but Canadian keyboard not deleted ):
<gs:GlobalizationServices xmlns:gs="urn:longhornGlobalizationUnattend">
<!--User List-->
<gs:UserList>
<gs:User UserID="Current"/>
</gs:UserList>
<!--input preferences-->
<gs:InputPreferences>
<!--en-US-->
<gs:InputLanguageID Action="add" ID="0409:00000409" Default="true"/>
<!--en-CANADA-->
<gs:InputLanguageID Action="remove" ID="1009:00001009"/>
</gs:InputPreferences>
</gs:GlobalizationServices>

The code above will add in the United States keyboard language if it doesn't exist and then set it as default, but unfortunately I can't get it to delete the Canadian keyboard language.

I was wondering if anyone else has a method for change all these settings? Perhaps there is something easy I have overlooked. As it stands now though I am stumped.

Any help would greatly be appreciated!

link|improve this question
feedback

1 Answer

up vote 0 down vote accepted

I was able to come up with a solution to my problem!
There are a few things I learned.

In the "ID", the portion of the number in front of the colon ("1009") represents the Region Keyboard ie English(Canada). The number after the colon ("00001009") is the actual language installed for that keyboard. "00001009" will actually target the "Canada French" under the Region keyboard of English(Canada)

Another thing that I learned is that the region codes on the MS site were not displayed properly, which is why I wasn't able to change the "Locale" properly. This link contains the values you need to use when changing the "Locale". US is GeoID=244

The other thing I ended up having to do was to create two different XML files and run them one after the other. For some reason, removing the English(Canada) keyboard and all of it's sublanguages then adding the English(US) keyboard in the same script was producing an error that was stopping the XML file from applying properly. I had to do the removal of the keyboards (I left the Format and Locale change) in one XML file and the adding of the US keyboard in another XML file.

Anyway, for anyone interested I will post my final XML files below. To run them I used the following commands in a batch file.

control intl.cpl,, /f:"<path_to_file>"

(there is a space after the second comma)

First script to remove keyboards, change Format, and change Locale
Pay special attention to how the "ID" values are done, it illustrates what I was trying to explain above!

    <gs:User UserID="Current"/>

    </gs:UserList>

    <!--input preferences - Keyboard languages-->

    <gs:InputPreferences>

    <!--Beginning of en-CANADA-->

    <!--Remove Canada French from under keyboard English(Canada)-->
    <gs:InputLanguageID Action="remove" ID="1009:00001009"/>
    <!--Remove Canadian MultiLingual Standard from under keyboard English(Canada)-->
    <gs:InputLanguageID Action="remove" ID="1009:00011009"/>
    <!--Remove US from under keyboard English(Canada)-->
    <gs:InputLanguageID Action="remove" ID="1009:00000409"/>

    <!--Beginning of en-US-->
    <!--Add keyboard US(English)-->
    <!--Please note that the command below was moved into another XML file. Reason being, it was causing an error-->
    <!--that would stop the US keyboard from being installed properly.-->
    <!--<gs:InputLanguageID Action="add" ID="0409:00000409" Default="true"/>-->

    </gs:InputPreferences>

    <!--location - Change location on Location tab to US-->

    <gs:LocationPreferences>

    <gs:GeoID Value="244"/>

    </gs:LocationPreferences>

    <!--User Locale - This changes formats to English(United States) ie M/dd/yyyy-->

    <gs:UserLocale>

    <gs:Locale Name="en-US" SetAsCurrent="true"/>

    </gs:UserLocale>


    </gs:GlobalizationServices>



This script will add in the US keyboard and set it as the system default keyboard

   <!--User List-->

   <gs:UserList>

   <gs:User UserID="Current"/>

   </gs:UserList>

   <!--input preferences - Keyboard languages-->

   <gs:InputPreferences>

   <!--Add keyboard US(English)-->
   <gs:InputLanguageID Action="add" ID="0409:00000409" Default="true"/>

   </gs:InputPreferences>

   </gs:GlobalizationServices>



That about sums it up.
Here are some additional helpful links:
http://msdn.microsoft.com/en-us/library/ms912389%28WinEmbedded.11%29.aspx
http://texhex.blogspot.com/2009/10/installing-and-configuring-language.html
http://msdn.microsoft.com/en-us/goglobal/bb896001
http://technet.microsoft.com/en-us/library/cc766503(WS.10).aspx

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.