Set-DefaultLang.ps1 Update Region Settings Error
- Dominant language
- PowerShell
- Stars
- 524
- Forks
- 610
- PR merge metrics
- No merged PRs in 30d
Description
When using AIB with the; https://github.com/Azure/RDS-Templates/blob/master/CustomImageTemplateScripts/CustomImageTemplateScripts_2024-03-27/SetDefaultLang.ps1 script, it errors out with the following:
[2307e355-4c39-4c28-83cd-6f1e9514174f] PACKER 2025/07/03 11:26:50 ui: azure-arm: WARNING: If the Windows Display Language has changed, it will take effect after the next sign-in.
[2307e355-4c39-4c28-83cd-6f1e9514174f] PACKER 2025/07/03 11:26:50 packer-provisioner-powershell plugin: [INFO] 1469 bytes written for 'stdout'
[2307e355-4c39-4c28-83cd-6f1e9514174f] PACKER 2025/07/03 11:26:50 packer-provisioner-powershell plugin: [INFO] 0 bytes written for 'stderr'
[2307e355-4c39-4c28-83cd-6f1e9514174f] PACKER 2025/07/03 11:26:50 packer-provisioner-powershell plugin: [INFO] RPC client: Communicator ended with: 1
[2307e355-4c39-4c28-83cd-6f1e9514174f] PACKER 2025/07/03 11:26:50 ui: azure-arm: WARNING: If the Windows Display Language has changed, it will take effect after the next sign-in.
[2307e355-4c39-4c28-83cd-6f1e9514174f] PACKER 2025/07/03 11:26:50 ui: azure-arm: *** AVD AIB CUSTOMIZER PHASE: Set default Language - English (United Kingdom) with en-GB has been set as the default System Preferred UI Language***
[2307e355-4c39-4c28-83cd-6f1e9514174f] PACKER 2025/07/03 11:26:50 ui: azure-arm: ***Starting AVD AIB CUSTOMIZER PHASE: Set default Language - Try deleting reg key
[2307e355-4c39-4c28-83cd-6f1e9514174f] PACKER 2025/07/03 11:26:50 ui: azure-arm: ***Starting AVD AIB CUSTOMIZER PHASE: Set default Language - Remove DeviceRegion registry key succeeded.
[2307e355-4c39-4c28-83cd-6f1e9514174f] PACKER 2025/07/03 11:26:50 ui: azure-arm: ***Starting AVD AIB CUSTOMIZER PHASE: Set default Language - UpdateRegionSettings: Error occurred: [Cannot find path 'C:\Windows\System32\HKU\.DEFAULT\Control Panel\International\Geo' because it does not exist.]
Am using Windows 11 24H2 Multi-session, I have a reboot step before the above, installing the UK language works fine (albeit it does take ages!) but setting default language to English united kingdom results in the above error.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with CustomImageTemplateScripts/CustomImageTemplateScripts_2024-03-27/SetDefaultLang.ps1 and inspect the UpdateRegionSettings step and the registry path reported in the error. Reproduce it on Windows 11 24H2 Multi-session with the reboot and language-install steps described. Done means the script completes without the missing-path error and sets English (United Kingdom) as the default language.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100