Инструменты пользователя

Инструменты сайта


Боковая панель

Главная страница


Часто задаваемые вопросы


Astra Linux Embedded


Windows IoT - общие вопросы


Windows 11 IoT Enterprise


Windows 10 IoT Enterprise


Windows 10 IoT Core


Windows Embedded Standard 8


Windows Embedded Standard 7


Windows Embedded POSReady


Windows Embedded Standard 2009


Windows XP Embedded


Windows Embedded Compact

локализация_win_10_iot_enterprise

Это старая версия документа!


Локализация Win 10 IoT Enterprise

Пример автоматизации с помощью PowerShell

Для получения доступа к разделу «Примеры автоматизации» **обратитесь к нашему менеджеру.**

Информация содержащаяся в данном разделе актуальна для Windows 10 1607.

В разделе «Примеры автоматизации» находится сводный скрипт с помощью которого можно выполнить все настройки о которых говорится в подразделах данного раздела.

Ниже приведен пример сводного скрипта, он выполняет все настройки локализации о которых говорится в подразделах данного раздела. Для работы данного скрипта необходимо чтобы требуемый языковой пакет находился рядом со скриптом или чтобы был подключен образ диска с языковыми пакетами. Для выполнения данного сценария необходимо сохранить данный сценарий как сценарий PowerShell, а затем выполнить сценарий.
Для установки других языков и временных зон Вам понадобятся:

Данный сценарий был написан под PowerShell 5.1.14393.0

if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit }

$global:LangGlobal="ru-ru"
$global:GeoIDGlobal=0xCB
$global:TimeZoneGlobal="Russian Standard Time"
$global:ScriptNameGlobal=[System.IO.Path]::GetFileNameWithoutExtension($MyInvocation.MyCommand.Name)

Function AddTypeByNeed ($Type) {if (!([appdomain]::CurrentDomain.GetAssemblies()|Where-Object Location -match $Type)) {Add-Type -AssemblyName $Type}}
Function GetOSArch {if ([System.IntPtr]::Size -eq 4) {Return ("x86")} else {Return ("x64")}}
Function MsgBox ($Message="", $Style=0, $Header="") {AddTypeByNeed -Type Microsoft.VisualBasic; Return ([Microsoft.VisualBasic.Interaction]::MsgBox($Message -join "`n", $Style, $Header))}
Function TestLPInstalled ($LPLang) {if ((Get-WmiObject -Class Win32_OperatingSystem).MUILanguages.ToLower() -contains $LPLang) {Return $True} else {Return ($False)}}

Function GetLPPath ($LPLang)
{
    $OSArch=GetOSArch
    $LPName="Microsoft-Windows-Client-Language-Pack_"+$OSArch+"_"+$LPLang+".cab"
    if (Test-Path "$($PSScriptRoot+"\"+$LPName)") {Return ($PSScriptRoot+"\"+$LPName)}
    foreach ($DriveLetter in Get-WmiObject -Class Win32_LogicalDisk) { if (Test-Path "$($DriveLetter.DeviceID+"\"+$OSArch+"\langpacks\"+$LPName)") {Return "$($DriveLetter.DeviceID+"\"+$OSArch+"\langpacks\"+$LPName)"} }
    Return ($LPName)
}

Function RegWrite ($Path, $Name="‡", $Type="", $Value="‡")
{
    if (!(Test-Path $Path)) {$Result = New-Item -Path $Path}
    if (($Name -eq "‡") -or ($Type -eq "") -or ($Value -eq "‡")) {Return($Result)}
    if ((Get-Item $Path).Property -contains $Name) {Remove-ItemProperty -Path $Path -Name $Name}
    Return (New-ItemProperty -Path $Path -Name $Name -PropertyType $Type -Value $Value)
}



if (!(TestLPInstalled -LPLang $LangGlobal))
{
    $LPFullPath = GetLPPath -LPLang $LangGlobal
    if (!(Test-Path $LPFullPath)) {Exit MsgBox -Message ("Can't find language pack:", """$($LPFullPath)""", "The script will be stopped") -Style 4112 -Header $ScriptNameGlobal}
    Add-WindowsPackage -Online -PackagePath $LPFullPath
    RegWrite -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce -Name $ScriptNameGlobal -Type String -Value """$PSHome\powershell.exe"" -executionpolicy unrestricted -file ""$PSCommandPath"""
    if ((MsgBox -Message ("You must reboot PC to changes take effect.", "The script not finished yet, script will resume automatically after logging in.", "Do you want to reboot PC now?") -Style 4132 -Header $ScriptNameGlobal) -Match "Yes") {Restart-Computer -Force}
    exit
}

if ((Get-Culture).Name.ToLower() -notcontains $LangGlobal)
{
    $LangList = Get-WinUserLanguageList
    $LangList.Add($LangGlobal)
    Set-WinUserLanguageList -LanguageList $LangList -Force
    Set-WinUILanguageOverride -Language $LangGlobal
    RegWrite -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce -Name $ScriptNameGlobal -Type String -Value """$PSHome\powershell.exe"" -executionpolicy unrestricted -file ""$PSCommandPath"""
    if ((MsgBox -Message ("You must log out to changes take effect.", "The script not finished yet, script will resume automatically after logging in.", "Do you want to log out now?") -Style 4132 -Header $ScriptNameGlobal) -Match "Yes") {(Get-WmiObject -Class Win32_OperatingSystem).Win32Shutdown(0)}
    exit
}

Set-WinSystemLocale $LangGlobal
Set-WinHomeLocation -GeoId $GeoIDGlobal
Set-TimeZone -id $TimeZoneGlobal

$ConfigXML = '<gs:GlobalizationServices xmlns:gs="urn:longhornGlobalizationUnattend">
    <gs:UserList>
        <gs:User UserID="Current" CopySettingsToDefaultUserAcct="true" CopySettingsToSystemAcct="true"/> 
    </gs:UserList>
</gs:GlobalizationServices>'
$ConfigXML | Out-File "$($PSScriptRoot)\Config.xml"
control "intl.cpl,,/f:`"$($PSScriptRoot)\Config.xml`""

if ((MsgBox -Message ("You must reboot PC to changes take effect.", "Do you want to reboot PC now?") -Style 4132 -Header $ScriptNameGlobal) -Match "Yes") {Restart-Computer -Force}
локализация_win_10_iot_enterprise.1537356558.txt.gz · Последние изменения: 2018/09/19 14:29 — vladimir