Closed inschrift-spruch-raum closed 1 month ago
To be honest, I probably never tested with Chinese images. There might be a more fundamental problem here.
I have downloaded the Win11_23H2_Chinese_Simplified_x64v2.iso
image and created an autounattend.xml file with the settings shown in your first screenshot. Windows Setup then displays this language selection dialog:
This is not the expected behavior. Windows Setup should instead use the language settings from the autounattend.xml file. Did you also see this dialog? What image did you use? Also, please attach the autounattend.xml file that you have generated.
The unexpected behavior might be related to this log message written to the X:\Windows\Panther\setupact.log
file:
Target language [zh-Hans-CN] is NOT a valid language
This is not the expected behavior. Windows Setup should instead use the language settings from the autounattend.xml file. Did you also see this dialog? What image did you use? Also, please attach the autounattend.xml file that you have generated.
Yes, I did see this window My unattended file
I have noticed Win11_23H2_Chinese_Simplified_x64v2.iso
contains a \sources\lang.ini
file with contents
[Available UI Languages]
zh-cn = 3
and Win11_23H2_Chinese_Traditional_x64v2.iso
contains a \sources\lang.ini
file with contents
[Available UI Languages]
zh-tw = 3
Therefore, I have replaced the UI language code zh-Hans-CN
with zh-CN
, and zh-Hant-CN
with zh-TW
via
https://github.com/cschneegans/unattend-generator/commit/5a25a4f871f27816c263487352b3973a8be7d1c2. This works well in my tests, i.e. the manual language dialog does not longer appear. Thank you for bringing this to my attention.
Existing URLs that use the zh-Hans-CN
or zh-Hant-CN
codes will be redirected automatically – so just open the form with your previous inputs and download the autounattend.xml file again.
Please run your Windows installation with the new autounattend.xml file and check if the issue is resolved.
@cschneegans, I did a test run with your changes and it looks like it works:
I didn't see the language selector screen
@cschneegans
Thank you for resolving the main issue, but there is another proposal here
2.Can a second preferred language be added to the unattended file
Do you have any solutions for it
I think the UI on this screen is somewhat misleading:
By clicking the Add a language button, you don't add a preferred language to Windows, you just add a language. The preference is rather established by the order of the languages.
Hence, setting your preferred language(s) is already possible in the form:
I have realized that my own form is misleading as well. I have redesigned the form to make it clearer how the 1st, 2nd and 3rd language preference are related:
It seems that it still doesn't work
As I can't read Chinese characters, I had a hard time to even figure out that your screenshot shows the Country or region and Regional format settings. FWIW, this is what that section looks like on my computer:
You need to specify: • What autounattend.xml settings did you use? (You can just upload your file here.) • What was the expected result for the Country or region and Regional format settings? • What was the actual result, i.e. what Country or region and Regional format settings are shown on your screenshot?
The box above shows China
Using your autounattend.xml file and the Win11_23H2_Chinese_Simplified_x64v2.iso
image, I get this result:
According to Google, 美国 is Chinese for United States, so I think the Country or region setting was applied correctly. I don't know why you are getting a different result. Please do the following:
Get-WinHomeLocation
and press Enter.Set-WinHomeLocation -GeoId 244
and press Enter.Get-WinHomeLocation
again and press Enter.Copy and paste the entire output here.
I have currently identified the problem: UUP image bug or NTLite encapsulation bug
After my testing, I discovered the reason
I removed PowerShell from NTLite
And in autounattend.xml, it is precisely using
PowerShell command Set-WinHomeLocation
completes region switch
But that doesn't mean I can't remove PowerShell
Because I found that such code is unnecessary
Actually, I only need to modify these four lines in autounattend.xml to achieve the purpose of setting the region
So, I need you to modify the source code so that it directly sets<SystemLocale>
and<UserLocale>
Instead of using PowerShell
I disagree. System locale, user locale and the home location are three distinct settings, and there is no XML element that sets the home location.
However, it appears that you can set the home location via the registry. Try using this .reg file in the Scripts to run whenever a user logs on for the first time section:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Control Panel\International\Geo]
"Nation"="244"
"Name"="US"
This link will configure the form to use the .reg file and the settings from the autounattend.xml file you posted earlier.
I disagree. System locale, user locale and the home location are three distinct settings, and there is no XML element that sets the home location.
I think<SystemLocale>
and<UserLocale>
can also be optional settings for unattend-generator
A new idea
Create Oobe.xml
before OOBE startup
Using the parameter <location>
in Oobe. xml
Save in Windows\System32\Oobe\Info
Delete files after OOBE ends
Look, the autounattend.xml files created by my generator rely heavily on PowerShell, and I have no plans to change this. If you decide to remove PowerShell, you are on your own.
1.The
home location
setting seems to be overridden byFormat dates, times, currency, and numbers arranging
2.Can a second preferred language be added to the unattended file