On Fri, 2 Aug 2019, Francois Gouget wrote:
Does anyone know how to automate adding new languages to Windows 10?
I looked into this but I did not find anything that looks like it could work.
As a reminder the manual way involves going to Settings -> Time & Language -> Language -> Add a language. Pick a language, scroll down to select a language, click Next and Install. Rinse repeat, one language at a time.
What I found:
* lpksetup Language packs can be installed with lpksetup.exe but this requires downloading the language pack files beforehand. I could download them and use TestAgent to send them to the VM. But: - These language packs are specific to each Windows version so I would need to repeat that whenever there's a new Windows version. - It seems the normal way to access these language packs is by downloading the "Language Pack ISO" but the access to this seems to be restricted to "OEMs and System Builders". - There are URLs floating around but they are hard to find, are only for old versions, and point to 404s so it's not even possible to test this approach.
* Dism /Online /Add-Package Dism is normally used to modify Windows installation disk images to integrate additional features: drivers, software, language packs, etc. That functionality is useless to me since I need to modify a live Windows installation.
Luckily the /Online option makes it possible to do just that. But:
- The command takes the form of "Dism /Online /Add-Package /PackagePath=..." where PackagePath specifies the path to the language pack file(s). So as for lpksetup this requires finding a way to download the language pack first.
* Dism /Online /Set-AllIntl "Dism /Set-AllIntl" is a related Dism command that sets the language settings. I was hoping it would also download and install the required components. But no such dice. In fact it does not even work on already installed languages (use "Dism /Online /Get-Intl" to get the list) because /Set-AllIntl is incompatible with the /Online option.
* Control intl.cpl This is the command I use to configure which language to use. You'd think that there would also be some option to install the language but if so I have not found it. I also doubt it's possible in the intl.cpl is an old "Control Panel" component whereas the only place to install the languages is in the new "Windows settings" app.
* AutoHotKey Seems like this would be a somewhat complex and fragile solution. I'm worried it would be hard to pick the right entry in the language drop-down list. I'm also wary of side-effects it could have on the test environment.
I think that sums up what I found. So again if someone knows how to do this...