3
4
OS: Windows 7 64-bit
I have a machine that has had its "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". Additionally, I want to create a script to do this, as I expect to run into more machines with this issue. I don't want to have to change settings through the GUI on every machine.
I need to do these actions on these tabs:
Region and Language (Format)-
I need "Format" 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 keyboard languages 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)"
(I have screenshots but I do not have the reputation required to post them.)
So far I have found this document from Microsoft that demonstrates an XML file that can be created to modify the settings above
The 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. Here's a working example:
<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.
Is there a method to programatically change all these settings? Am I overlooking something obvious?
1Oh, this might explain a problem I had that forced me to split the .XML in two. Basically the keyboard wouldn't set properly. I thought it was a bug or something in the XML. But I bet it was probably just the order that I was doing it in. I will have to go back and test thank you for the tip! – bourne – 2012-10-01T15:35:30.890