From 1e5ead8050570e2aafe227105e40974f7cc9f884 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 19 May 2024 20:15:04 +0200 Subject: [PATCH] feat: Increase default screen resolution (#125) --- assets/win10arm64.xml | 7 ++++++- assets/win11arm64.xml | 7 ++++++- src/install.sh | 15 ++++++++++----- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/assets/win10arm64.xml b/assets/win10arm64.xml index b3b1c82..586dc0b 100644 --- a/assets/win10arm64.xml +++ b/assets/win10arm64.xml @@ -340,13 +340,18 @@ true</PlainText> </Password> </AutoLogon> + <Display> + <ColorDepth>32</ColorDepth> + <HorizontalResolution>1920</HorizontalResolution> + <VerticalResolution>1080</VerticalResolution> + </Display> <OOBE> <HideEULAPage>true</HideEULAPage> <HideLocalAccountScreen>true</HideLocalAccountScreen> <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> <HideOnlineAccountScreens>true</HideOnlineAccountScreens> <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> - <NetworkLocation>Other</NetworkLocation> + <NetworkLocation>Home</NetworkLocation> <ProtectYourPC>3</ProtectYourPC> <SkipUserOOBE>true</SkipUserOOBE> <SkipMachineOOBE>true</SkipMachineOOBE> diff --git a/assets/win11arm64.xml b/assets/win11arm64.xml index 58cbe9b..0f37034 100644 --- a/assets/win11arm64.xml +++ b/assets/win11arm64.xml @@ -359,13 +359,18 @@ <PlainText>true</PlainText> </Password> </AutoLogon> + <Display> + <ColorDepth>32</ColorDepth> + <HorizontalResolution>1920</HorizontalResolution> + <VerticalResolution>1080</VerticalResolution> + </Display> <OOBE> <HideEULAPage>true</HideEULAPage> <HideLocalAccountScreen>true</HideLocalAccountScreen> <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> <HideOnlineAccountScreens>true</HideOnlineAccountScreens> <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> - <NetworkLocation>Other</NetworkLocation> + <NetworkLocation>Home</NetworkLocation> <ProtectYourPC>3</ProtectYourPC> <SkipUserOOBE>true</SkipUserOOBE> <SkipMachineOOBE>true</SkipMachineOOBE> diff --git a/src/install.sh b/src/install.sh index 93a225c..5aefed4 100644 --- a/src/install.sh +++ b/src/install.sh @@ -624,7 +624,7 @@ updateXML() { local asset="$1" local language="$2" - local culture region keyboard + local culture region admin pass keyboard culture=$(getLanguage "$language" "culture") @@ -649,16 +649,21 @@ updateXML() { fi if [ -n "$USERNAME" ]; then - sed -i "s/where name=\"Docker\"/where name=\"$USERNAME\"/g" "$asset" sed -i "s/<Name>Docker<\/Name>/<Name>$USERNAME<\/Name>/g" "$asset" + sed -i "s/where name=\"Docker\"/where name=\"$USERNAME\"/g" "$asset" sed -i "s/<FullName>Docker<\/FullName>/<FullName>$USERNAME<\/FullName>/g" "$asset" sed -i "s/<Username>Docker<\/Username>/<Username>$USERNAME<\/Username>/g" "$asset" fi if [ -n "$PASSWORD" ]; then - sed -i "s/<Value>password<\/Value>/<Value>$PASSWORD<\/Value>/g" "$asset" - sed -z "s/<Password>...........<Value \/>/<Password>\n <Value>$PASSWORD<\/Value>/g" -i "$asset" - sed -z "s/<Password>...............<Value \/>/<Password>\n <Value>$PASSWORD<\/Value>/g" -i "$asset" + pass=$(printf '%s' "${PASSWORD}Password" | iconv -f utf-8 -t utf-16le | base64) + admin=$(printf '%s' "${PASSWORD}AdministratorPassword" | iconv -f utf-8 -t utf-16le | base64) + sed -i "s/<Value>password<\/Value>/<Value>$admin<\/Value>/g" "$asset" + sed -i "s/<PlainText>true<\/PlainText>/<PlainText>false<\/PlainText>/g" "$asset" + sed -z "s/<Password>...........<Value \/>/<Password>\n <Value>$pass<\/Value>/g" -i "$asset" + sed -z "s/<Password>...............<Value \/>/<Password>\n <Value>$pass<\/Value>/g" -i "$asset" + sed -z "s/<AdministratorPassword>...........<Value \/>/<AdministratorPassword>\n <Value>$admin<\/Value>/g" -i "$asset" + sed -z "s/<AdministratorPassword>...............<Value \/>/<AdministratorPassword>\n <Value>$admin<\/Value>/g" -i "$asset" fi return 0