Copy Region & Language settings during setup

This commit is contained in:
Manuel Thalmann 2023-08-05 04:11:43 +02:00
parent a944f8d575
commit 9b59884ef6
2 changed files with 4 additions and 1 deletions

View file

@ -12,7 +12,6 @@ Write-Information "Remove MSEdge Icon";
$context.RemoveDesktopIcon("Microsoft Edge*");
Write-Host "Configuring Windows";
Write-Information "Set old-school icon size";
$action = {
param([Microsoft.Win32.RegistryKey] $userKey)
@ -20,6 +19,7 @@ $action = {
$spacingProperty = "IconSpacing";
$relativeKeyPath = "Control Panel\Desktop\WindowMetrics"
$keyPath = "$($userKey.PSPath)\$relativeKeyPath";
Write-Information "Setting old-school Desktop Icon Size";
Copy-ItemProperty "HKCU:\$relativeKeyPath" "$keyPath" "$spacingProperty";
Rename-ItemProperty $keyPath $spacingProperty "_$spacingProperty";
Set-ItemProperty $keyPath -Name $spacingProperty -Value "-1710" -Type "String";
@ -77,5 +77,7 @@ $startLayout | Add-Member -NotePropertyName "primaryOEMPins" -NotePropertyValue
$startLayout | ConvertTo-Json -Compress | Set-Content "$env:SystemDrive\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.json";
Write-Information "Copy Region & Language Settings to System Configuration";
Pop-Location;
Remove-Item -Recurse "$tempDir";

View file

@ -46,6 +46,7 @@ function Restore-WindowsInstallation([Context] $context) {
$context.Restore($backupPath, $context.BackupRoot());
}
Copy-UserInternationalSettingsToSystem -WelcomeScreen $True -NewUser $False;
Restore-PersonalFiles $context;
Restore-PersonalApps $context;
Remove-Item -Recurse $context.RootDir;