BigDaddyO Posted July 9, 2010 Share Posted July 9, 2010 I am working on customizing an installer for some French Canadian PC's, but the application requires their Country Code to be 1 and the Locale to be 0409. also known as Anglais (Canada) I have a script that can read their current settings but can't figure out how to change those settings. $objWMIService = ObjGet("winmgmts:\\.\root\CIMV2") $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_OperatingSystem") For $objItem In $colItems $sReturn = "Country Code: " & $objItem.CountryCode $sReturn &= @CRLF & "Locale: " & $objItem.Locale $sReturn &= @CRLF & "OS Language: " & $objItem.OSLanguage $sReturn &= @CRLF & "Code Set: " & $objItem.CodeSet FileWrite(@DesktopDir & "\Locale.txt", $sReturn) Next French Canadian pc's return this Country Code: 2 Locale: 0c0c OS Language: 1036 Code Set: 1252 I need to change the settings to Anglais (Canada) Country Code: 1 Locale: 0409 OS Language: 1036 Code Set: 1252 Anyone have some ideas? Google and Bing searches are not giving me much to go on. Thanks, Mike Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 9, 2010 Share Posted July 9, 2010 Those properties of the Win32_OperatingSystem object are read-only. Did you try it from the registry settings at "HKCU\Control Panel\International"? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now