Jump to content

Recommended Posts

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...