From 1c79e3e1f8bcd5cffcfd5e7d16e7311f310caca8 Mon Sep 17 00:00:00 2001 From: Kroese Date: Fri, 26 Jan 2024 06:05:01 +0100 Subject: [PATCH] feat: Support Windows 10 LTSC (#97) --- assets/win10x64-ltsc.xml | 401 +++++++++++++++++++++++++++++++++++++++ readme.md | 2 + src/install.sh | 24 ++- 3 files changed, 425 insertions(+), 2 deletions(-) create mode 100644 assets/win10x64-ltsc.xml diff --git a/assets/win10x64-ltsc.xml b/assets/win10x64-ltsc.xml new file mode 100644 index 0000000..6b2f003 --- /dev/null +++ b/assets/win10x64-ltsc.xml @@ -0,0 +1,401 @@ + + + + + + en-US + + 0409:00000409 + en-US + en-US + en-US + + + + + 0 + true + + + + 1 + Primary + 300 + + + + 2 + EFI + 100 + + + + 3 + MSR + 128 + + + + 4 + Primary + true + + + + + + 1 + 1 + + NTFS + DE94BBA4-06D1-4D40-A16A-BFD50179D6AC + + + + 2 + 2 + + FAT32 + + + + 3 + 3 + + + + 4 + 4 + + C + NTFS + + + + + + + + + /image/index + 1 + + + + 0 + 4 + + false + + + + true + Never + + + false + Never + + + true + Docker + Windows for Docker + + + false + + false + + + + + + D:\viostor\w10\amd64 + + + D:\NetKVM\w10\amd64 + + + D:\Balloon\w10\amd64 + + + D:\pvpanic\w10\amd64 + + + D:\qemupciserial\w10\amd64 + + + D:\qxldod\w10\amd64 + + + D:\vioinput\w10\amd64 + + + D:\viorng\w10\amd64 + + + D:\vioscsi\w10\amd64 + + + D:\vioserial\w10\amd64 + + + + + + + false + + + * + + + + + true + + + 1 + + + + + true + + + * + + Dockur + Windows for Docker + 24/7 + + Dockur + https://github.com/dockur/windows/issues + + Windows for Docker + + + 1 + + + true + true + about:blank + about:blank + + + true + true + about:blank + about:blank + + + 0 + + + + + 1 + reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE" /v BypassNRO /t REG_DWORD /d 1 /f + + + 2 + netsh.exe advfirewall firewall set rule group="Remote Desktop" new enable=Yes + + + 3 + reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f + + + 4 + fsutil.exe behavior set disableLastAccess 1 + + + 5 + reg.exe load "HKU\mount" "C:\Users\Default\NTUSER.DAT" + + + 6 + reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "ContentDeliveryAllowed" /t REG_DWORD /d 0 /f + + + 7 + reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "FeatureManagementEnabled" /t REG_DWORD /d 0 /f + + + 8 + reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "OEMPreInstalledAppsEnabled" /t REG_DWORD /d 0 /f + + + 9 + reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEnabled" /t REG_DWORD /d 0 /f + + + 10 + reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEverEnabled" /t REG_DWORD /d 0 /f + + + 11 + reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SilentInstalledAppsEnabled" /t REG_DWORD /d 0 /f + + + 12 + reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SoftLandingEnabled" /t REG_DWORD /d 0 /f + + + 13 + reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContentEnabled" /t REG_DWORD /d 0 /f + + + 14 + reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-310093Enabled" /t REG_DWORD /d 0 /f + + + 15 + reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338387Enabled" /t REG_DWORD /d 0 /f + + + 16 + reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338388Enabled" /t REG_DWORD /d 0 /f + + + 17 + reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338389Enabled" /t REG_DWORD /d 0 /f + + + 18 + reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338393Enabled" /t REG_DWORD /d 0 /f + + + 19 + reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-353698Enabled" /t REG_DWORD /d 0 /f + + + 20 + reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SystemPaneSuggestionsEnabled" /t REG_DWORD /d 0 /f + + + 21 + reg.exe unload "HKU\mount" + + + 22 + reg.exe add "HKLM\Software\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsConsumerFeatures" /t REG_DWORD /d 0 /f + + + + + + + + + 0409:00000409 + en-US + en-US + en-US + + + + + + Docker + Administrators + + + true</PlainText> + </Password> + </LocalAccount> + </LocalAccounts> + <AdministratorPassword> + <Value>password</Value> + <PlainText>true</PlainText> + </AdministratorPassword> + </UserAccounts> + <AutoLogon> + <Username>Docker</Username> + <Enabled>true</Enabled> + <LogonCount>1</LogonCount> + <Password> + <Value /> + <PlainText>true</PlainText> + </Password> + </AutoLogon> + <OOBE> + <HideEULAPage>true</HideEULAPage> + <HideLocalAccountScreen>true</HideLocalAccountScreen> + <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> + <HideOnlineAccountScreens>true</HideOnlineAccountScreens> + <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> + <NetworkLocation>Other</NetworkLocation> + <ProtectYourPC>3</ProtectYourPC> + <SkipUserOOBE>true</SkipUserOOBE> + <SkipMachineOOBE>true</SkipMachineOOBE> + <VMModeOptimizations> + <SkipWinREInitialization>true</SkipWinREInitialization> + </VMModeOptimizations> + </OOBE> + <RegisteredOrganization>Dockur</RegisteredOrganization> + <RegisteredOwner>Windows for Docker</RegisteredOwner> + <FirstLogonCommands> + <SynchronousCommand wcm:action="add"> + <Order>1</Order> + <CommandLine>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /t REG_DWORD /d 0 /f</CommandLine> + <Description>Set AutoLogonCount to 0</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>2</Order> + <CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /v LimitBlankPasswordUse /t REG_DWORD /d 0 /f</CommandLine> + <Description>Allow RDP login with blank password</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>3</Order> + <RequiresUserInput>false</RequiresUserInput> + <CommandLine>cmd /C wmic useraccount where name="Docker" set PasswordExpires=false</CommandLine> + <Description>Password Never Expires</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>4</Order> + <RequiresUserInput>false</RequiresUserInput> + <CommandLine>cmd /C POWERCFG -H OFF</CommandLine> + <Description>Disable Hibernation</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>5</Order> + <RequiresUserInput>false</RequiresUserInput> + <CommandLine>cmd /C POWERCFG -X -monitor-timeout-ac 0</CommandLine> + <Description>Disable monitor blanking</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>6</Order> + <CommandLine>reg.exe add "HKCU\Control Panel\Desktop" /v "ScreenSaveActive" /t REG_DWORD /d 0 /f</CommandLine> + <Description>Disable screensaver</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>7</Order> + <CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Network\NewNetworkWindowOff" /f</CommandLine> + <Description>Disable Network Discovery popup</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>8</Order> + <CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Network\NetworkLocationWizard" /v "HideWizard" /t REG_DWORD /d 1 /f</CommandLine> + <Description>Disable Network Discovery popup</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>9</Order> + <CommandLine>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "HideFirstRunExperience" /t REG_DWORD /d 1 /f</CommandLine> + <Description>Disable first-run experience in Edge</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>10</Order> + <CommandLine>reg.exe add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideFileExt" /t REG_DWORD /d 0 /f</CommandLine> + <Description>Show file extensions in Explorer</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>11</Order> + <CommandLine>msiexec /i E:\virtio-win-gt-x64.msi /qb!</CommandLine> + <Description>Install VirtIO drivers</Description> + </SynchronousCommand> + </FirstLogonCommands> + </component> + </settings> +</unattend> diff --git a/readme.md b/readme.md index 6fcf6df..d15adbd 100644 --- a/readme.md +++ b/readme.md @@ -77,11 +77,13 @@ docker run -it --rm -p 8006:8006 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti - ```win11``` = Windows 11 - ```win10``` = Windows 10 + - ```ltsc10``` = Windows 10 LTSC - ```win81``` = Windows 8.1 - ```win22``` = Windows Server 2022 - ```win19``` = Windows Server 2019 - ```win16``` = Windows Server 2016 - ```tiny11``` = Tiny 11 (Slow download) + - ```tiny10``` = Tiny 10 (Slow download) - ```win7``` = Windows 7 (Slow download) * ### How do I increase the amount of CPU or RAM? diff --git a/src/install.sh b/src/install.sh index a02c916..9c9578d 100644 --- a/src/install.sh +++ b/src/install.sh @@ -39,10 +39,19 @@ fi [[ "${VERSION,,}" == "win16" ]] && VERSION="win2016-eval" [[ "${VERSION,,}" == "win2016" ]] && VERSION="win2016-eval" +[[ "${VERSION,,}" == "ltsc10" ]] && VERSION="win10x64-enterprise-ltsc-eval" +[[ "${VERSION,,}" == "10ltsc" ]] && VERSION="win10x64-enterprise-ltsc-eval" +[[ "${VERSION,,}" == "win10-ltsc" ]] && VERSION="win10x64-enterprise-ltsc-eval" +[[ "${VERSION,,}" == "win10x64-ltsc" ]] && VERSION="win10x64-enterprise-ltsc-eval" + if [[ "${VERSION,,}" == "tiny11" ]]; then VERSION="https://archive.org/download/tiny-11-core-x-64-beta-1/tiny11%20core%20x64%20beta%201.iso" fi +if [[ "${VERSION,,}" == "tiny10" ]]; then + VERSION="https://archive.org/download/tiny-10-23-h2/tiny10%20x64%2023h2.iso" +fi + CUSTOM="custom.iso" [ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="Custom.iso" @@ -309,12 +318,19 @@ findVersion() { local detected="" [[ "${name,,}" == *"windows 11"* ]] && detected="win11x64" - [[ "${name,,}" == *"windows 10"* ]] && detected="win10x64" [[ "${name,,}" == *"windows 8"* ]] && detected="win81x64" [[ "${name,,}" == *"server 2022"* ]] && detected="win2022-eval" [[ "${name,,}" == *"server 2019"* ]] && detected="win2019-eval" [[ "${name,,}" == *"server 2016"* ]] && detected="win2016-eval" [[ "${name,,}" == *"windows 7"* ]] && detected="win7x64-ultimate" + + if [[ "${name,,}" == *"windows 10"* ]]; then + if [[ "${name,,}" == *"enterprise ltsc"* ]]; then + detected="win10x64-ltsc" + else + detected="win10x64" + fi + fi echo "$detected" return 0 @@ -329,7 +345,11 @@ detectImage() { DETECTED="" if [[ "$EXTERNAL" != [Yy1]* ]] && [ -z "$CUSTOM" ]; then - DETECTED="$VERSION" + if [[ "${VERSION,,}" != "win10x64-enterprise-ltsc-eval" ]]; then + DETECTED="$VERSION" + else + DETECTED="win10x64-ltsc" + fi if [[ "$MANUAL" != [Yy1]* ]]; then if [ -f "/run/assets/$DETECTED.xml" ]; then XML="$DETECTED.xml"