SOLVED

Intune auto pilot international settings

Frequent Contributor

Hi everyone,

I'm trying to achieve the following for new computers in autopilot:

  1. Set time zone to my time zone
  2. Set system locale, culture and windows home location to my country
  3. Set a language list to use en-US and my country's language
  4. Make sure that my country language is installed on the compute

In MECM this is the Apply windows settings which looks like this:

RahamimL_0-1644920656924.png

The end result I'm looking for is this:

RahamimL_1-1644920772965.png

I searched the web and also found the Copy-UserInternationalSettingsToSystem, but this is for windows 11... We are still deploying windows 10.

I found and tested multiple options such as deploying the LXP and using several powershell commands to apply what I need but it doesn't exactly work.

This is my autopilot profile:

RahamimL_2-1644921075137.png

Is there a way to use some unattended file or any other way to configure the operating system to our international settings?

 

Rahamim.

8 Replies

Hi

Normally I would say to create a powershell script with the additional language cab in it. And configure all settings you want in that powershell script. as example

DISM /Online /Add-Package /PackagePath: .\lp.cab
Set-WinUILanguageOverride <xx-xx> (where xx-xx is your language culture)

And convert it to a win32 app and deploy it as an required app during autopilot esp?

Could you show us what you have tried until know?

Thanks for the reply,
I just found found the site Michael Niehus' website https://oofhours.com/ and realized I only did half of what AutoPilot has to offer. I found out I didn't use the enrollment status page . I'm trying to work with it now to see if that will do what I'm looking for.
Also, can someone tell me the keyboard shortcut to open cmd in ESP?
Hi, Shift + f10... but that one needs to be removed :p
https://call4cloud.nl/2022/01/the-oobe-massacre-the-beginning-of-shift-f10/
I guess also did some blogs about autopilot and some tpm stuff..



Thanks for the help will update on this as soon as I will have results.

I was able to run trials on a VM and I can't get this to work.

I created a win32 app deployed to system with the following script:

$Hebrew = Get-WindowsCapability -online -Name lang*he* | Where-Object displayname -Match "hebrew"
foreach($h in $Hebrew){if($h.State -ne "Installed"){Add-WindowsCapability -Online -Verbose -Name $h.name}}
Set-WinSystemLocale -SystemLocale he-IL
Set-Culture -CultureInfo he-IL
Set-WinHomeLocation -GeoId 117
Set-WinUserLanguageList en-US,he-IL -Force
$XMLfile = @"
<gs:GlobalizationServices xmlns:gs="urn:longhornGlobalizationUnattend">

<!-- user list -->
<gs:UserList>
<gs:User UserID="Current" CopySettingsToDefaultUserAcct="true" CopySettingsToSystemAcct="true"/>
</gs:UserList>

<!-- system locale -->
<gs:SystemLocale Name="he-IL"/>

<!-- input preferences -->
<gs:InputPreferences>
<gs:InputLanguageID Action="add" ID="0409:00000409"/>
<gs:InputLanguageID Action="add" ID="040D:0000040D"/>
<!--gs:InputLanguageID Action="remove" ID="0409:00000409"/-->
</gs:InputPreferences>

</gs:GlobalizationServices>
"@
New-Item -Path $env:TEMP -Name "intlcfg.xml" -Value $XMLfile -Force -Verbose
$XMLPath = Join-Path $env:Temp -ChildPath "intlcfg.xml"
& $env:windir\System32\control.exe "intl.cpl,,/f:`"$XMLPath`""
Start-Sleep 5
& $env:windir\System32\control.exe "intl.cpl,,/f:`"$XMLPath`""
Get-Item -Path (Join-Path $env:TEMP -ChildPath "intlcfg.xml") | Remove-Item -Verbose

 

If I run this manually in an OOBE fresh installation, I get the expected result. but when I try it during autopilot the settings don't copy.

 

Rahamim.

Hi.. Is the XML file even created or just not executed

@Rudy_Ooms_MVP as far as I see in Intune the application is configured correctly. This is the detection script:

try{
$iCountry = (Get-ItemProperty 'HKCU:\Control Panel\International' -Name iCountry -ErrorAction Stop).iCountry
$Locale = (Get-ItemProperty 'HKCU:\Control Panel\International' -Name Locale -ErrorAction Stop).Locale
$iCurrDigits = (Get-ItemProperty 'HKCU:\Control Panel\International' -Name iCurrDigits -ErrorAction Stop).iCurrDigits
$iCurrency = (Get-ItemProperty 'HKCU:\Control Panel\International' -Name iCurrency -ErrorAction Stop).iCurrency
$iLZero = (Get-ItemProperty 'HKCU:\Control Panel\International' -Name iLZero -ErrorAction Stop).iLZero
if($iCountry -eq 972 -and `
$Locale -eq '0000040D' -and `
$iCurrDigits -eq 2 -and `
$iCurrency -eq 2 -and `
$iLZero -eq 1){
Write-Output "International configurations were set correctly"
exit 0
}
}catch{
$ErrorMessage = $_.Exception.Message
Write-Error $ErrorMessage
exit 1
}

 

If this detection script is wrong I'll be happy to know what to change. As I said, this works manually in OOBE.

best response confirmed by RahamimL (Frequent Contributor)
Solution

@Rudy_Ooms_MVP thanks for your help.

 

My xml was wrong. I ended up creating a different app with a CMD file in it and the xml inside the win32 package. I also separated the PowerShell script to add the language to a different win32 package.

 

For anyone requiring something similar here is my xml:

<gs:GlobalizationServices xmlns:gs="urn:longhornGlobalizationUnattend">

<gs:UserList>
<gs:User UserID="Current" CopySettingsToDefaultUserAcct="true" CopySettingsToSystemAcct="true"/>
</gs:UserList>

<!-- GeoID -->
<gs:LocationPreferences>
<gs:GeoID Value="117"/>
</gs:LocationPreferences>

<gs:MUILanguagePreferences>
<gs:MUILanguage Value="en-US"/>
<gs:MUIFallback Value="he-IL"/>
</gs:MUILanguagePreferences>

<!-- system locale -->
<gs:SystemLocale Name="he-IL"/>

<!-- input preferences -->
<gs:InputPreferences>
<gs:InputLanguageID Action="add" ID="0409:00000409"/>
<gs:InputLanguageID Action="add" ID="040D:0002040D"/>
</gs:InputPreferences>
<gs:UserLocale>
<gs:Locale Name="he-IL" SetAsCurrent="true" ResetAllSettings="false">
</gs:Locale>
</gs:UserLocale>
</gs:GlobalizationServices>

 

For detection of the application:

try{
    $DefaultHive = "microsoft.powershell.core\Registry::HKEY_USERS\.DEFAULT"
    $CP = Join-Path -Path $DefaultHive -ChildPath "Control Panel\International"
    $KL = Join-Path -Path $DefaultHive -ChildPath "Keyboard Layout\Preload"
    $DHCP = Get-ItemProperty -Path $CP
    $DHKL = Get-ItemProperty -Path $KL
    if($DHCP.Locale -eq "0000040D" `
    -and $DHCP.LocaleName -eq "he-IL" `
    -and $DHCP.iCountry -eq "972" `
    -and $DHKL.1 -eq "00000409" `
    -and $DHKL.2 -eq "0000040D"){
        Write-Output "Profile international settings were copied successfully"
        exit 0
    }else{
        Write-Error "Error copying profile international settings"
        exit 1
    }
}catch{
    $ErrorMessage = $_.Exception.Message
    Write-Error $ErrorMessage
    exit 1
}

Rahamim