From 469be849f051f0358e0ecb27fe8e31fe7bd54f34 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 08:51:58 +0200 Subject: [PATCH 01/49] fix: Gateway --- src/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/install.sh b/src/install.sh index c3fa8ef..816eb7b 100644 --- a/src/install.sh +++ b/src/install.sh @@ -756,8 +756,8 @@ updateXML() { local language="$2" local culture region user admin pass keyboard - if [ -n "${VM_NET_IP:-}" ]; then - sed -i "s/ 20.20.20.1 / ${VM_NET_IP%.*}.1 /g" "$asset" + if [ -n "${VM_NET_GATEWAY:-}" ]; then + sed -i "s/ 20.20.20.1 / $VM_NET_GATEWAY /g" "$asset" fi [ -z "$HEIGHT" ] && HEIGHT="720" From b977119ee258632510c42ae768b577e5cfc14931 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 08:53:13 +0200 Subject: [PATCH 02/49] fix: Gateway --- src/define.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/define.sh b/src/define.sh index 6edc4bd..160b9d8 100644 --- a/src/define.sh +++ b/src/define.sh @@ -1585,7 +1585,7 @@ prepareInstall() { [ -z "$password" ] && password="admin" local ip="20.20.20.1" - [ -n "${VM_NET_IP:-}" ] && ip="${VM_NET_IP%.*}.1" + [ -n "${VM_NET_GATEWAY:-}" ] && ip="$VM_NET_GATEWAY" find "$target" -maxdepth 1 -type f -iname winnt.sif -exec rm {} \; From 8f9d6b7e76ecda3bcfc53ddc0a899e4c93c206c2 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:02:17 +0200 Subject: [PATCH 03/49] feat: Remove hosts file --- src/install.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/install.sh b/src/install.sh index 816eb7b..396911f 100644 --- a/src/install.sh +++ b/src/install.sh @@ -756,10 +756,6 @@ updateXML() { local language="$2" local culture region user admin pass keyboard - if [ -n "${VM_NET_GATEWAY:-}" ]; then - sed -i "s/ 20.20.20.1 / $VM_NET_GATEWAY /g" "$asset" - fi - [ -z "$HEIGHT" ] && HEIGHT="720" [ -z "$WIDTH" ] && WIDTH="1280" From 1f521191697b85bfdf45ba71a88be361879ea8af Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:05:13 +0200 Subject: [PATCH 04/49] fix: Remove hosts file Removed IP address handling and related file operations. --- src/define.sh | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/define.sh b/src/define.sh index 160b9d8..d094037 100644 --- a/src/define.sh +++ b/src/define.sh @@ -1584,9 +1584,6 @@ prepareInstall() { [ -n "$PASSWORD" ] && password=$(echo "$PASSWORD" | sed 's/"//g') [ -z "$password" ] && password="admin" - local ip="20.20.20.1" - [ -n "${VM_NET_GATEWAY:-}" ] && ip="$VM_NET_GATEWAY" - find "$target" -maxdepth 1 -type f -iname winnt.sif -exec rm {} \; { echo "[Data]" @@ -1769,14 +1766,6 @@ prepareInstall() { echo "" echo "Call Domain.MoveHere(LocalAdminADsPath, \"$username\")" echo "" - echo "With (CreateObject(\"Scripting.FileSystemObject\"))" - echo " SysRoot = WshShell.ExpandEnvironmentStrings(\"%SystemRoot%\")" - echo " Set oFile = .OpenTextFile(SysRoot & \"\system32\drivers\etc\hosts\", 8, true)" - echo " oFile.Write(\"$ip host.lan\")" - echo " oFile.Close()" - echo " Set oFile = Nothing" - echo "End With" - echo "" echo "Set oLink = WshShell.CreateShortcut(WshShell.ExpandEnvironmentStrings(\"%userprofile%\\Desktop\\Shared.lnk\"))" echo "With oLink" echo " .TargetPath = \"\\\\host.lan\\Data\"" From 1f823c51dacd844b43061ab4cc6782b0caac2de2 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:06:41 +0200 Subject: [PATCH 05/49] Update win10x64.xml --- assets/win10x64.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/assets/win10x64.xml b/assets/win10x64.xml index 08e8c79..ef19c57 100644 --- a/assets/win10x64.xml +++ b/assets/win10x64.xml @@ -418,16 +418,11 @@ 21 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 22 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 23 + 22 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists From c5a70161e7546bf70a8242f946decc34e3bcdde6 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:07:21 +0200 Subject: [PATCH 06/49] Update first logon commands in win10x64-ltsc.xml Removed command to add entry in hosts file and adjusted order of commands. --- assets/win10x64-ltsc.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/assets/win10x64-ltsc.xml b/assets/win10x64-ltsc.xml index e0e6c98..6957f2b 100644 --- a/assets/win10x64-ltsc.xml +++ b/assets/win10x64-ltsc.xml @@ -421,16 +421,11 @@ 21 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 22 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 23 + 22 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists From d58aea5cab0bca6b83a285184b266c0a277ed44a Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:07:44 +0200 Subject: [PATCH 07/49] Update win10x64-iot.xml --- assets/win10x64-iot.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/assets/win10x64-iot.xml b/assets/win10x64-iot.xml index 01534bb..bed9cbe 100644 --- a/assets/win10x64-iot.xml +++ b/assets/win10x64-iot.xml @@ -424,16 +424,11 @@ 21 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 22 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 23 + 22 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists From df34f1c8c33f4233e23b10108ec56ba5e0e08d54 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:08:11 +0200 Subject: [PATCH 08/49] Update win10x64-enterprise.xml --- assets/win10x64-enterprise.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/assets/win10x64-enterprise.xml b/assets/win10x64-enterprise.xml index 733d1ec..c998592 100644 --- a/assets/win10x64-enterprise.xml +++ b/assets/win10x64-enterprise.xml @@ -418,16 +418,11 @@ 21 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 22 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 23 + 22 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists From bd0217ff531800334f6c084d7a0992d94e305194 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:08:39 +0200 Subject: [PATCH 09/49] Refactor first logon commands in XML configuration Removed command to add entry in hosts file and adjusted order for creating desktop shortcut. --- assets/win10x64-enterprise-eval.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/assets/win10x64-enterprise-eval.xml b/assets/win10x64-enterprise-eval.xml index 7ea00ef..41e8a70 100644 --- a/assets/win10x64-enterprise-eval.xml +++ b/assets/win10x64-enterprise-eval.xml @@ -415,16 +415,11 @@ 21 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 22 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 23 + 22 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists From d78873c64f7af7d340ad71aa4edabde060eb851a Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:09:20 +0200 Subject: [PATCH 10/49] Remove hosts file entry command and adjust order Removed command to add entry in hosts file and adjusted order of subsequent commands. --- assets/win11x64.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/assets/win11x64.xml b/assets/win11x64.xml index 76e7a79..95d1d16 100644 --- a/assets/win11x64.xml +++ b/assets/win11x64.xml @@ -456,16 +456,11 @@ 24 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 25 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 26 + 25 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists From 27908c7279b2d89af3139f0f2c262added386ce6 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:09:41 +0200 Subject: [PATCH 11/49] Modify first logon commands in win11x64-ltsc.xml Removed command to add entry in hosts file and adjusted order of commands. --- assets/win11x64-ltsc.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/assets/win11x64-ltsc.xml b/assets/win11x64-ltsc.xml index 8e4a969..7707cfb 100644 --- a/assets/win11x64-ltsc.xml +++ b/assets/win11x64-ltsc.xml @@ -456,16 +456,11 @@ 24 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 25 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 26 + 25 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists From a2613263a8e50ca05ba30a98f3ed74b4a38497f6 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:10:01 +0200 Subject: [PATCH 12/49] Update win11x64-iot.xml --- assets/win11x64-iot.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/assets/win11x64-iot.xml b/assets/win11x64-iot.xml index 5a1b8ae..91ab3ce 100644 --- a/assets/win11x64-iot.xml +++ b/assets/win11x64-iot.xml @@ -456,16 +456,11 @@ 24 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 25 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 26 + 25 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists From 2ce7dd3bb78e89edbaccb0f05f470113ad2508c1 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:10:23 +0200 Subject: [PATCH 13/49] Refactor first logon commands in win11x64-enterprise.xml Removed command to add entry in hosts file and adjusted order of subsequent commands. --- assets/win11x64-enterprise.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/assets/win11x64-enterprise.xml b/assets/win11x64-enterprise.xml index a9a192b..4c6746e 100644 --- a/assets/win11x64-enterprise.xml +++ b/assets/win11x64-enterprise.xml @@ -456,16 +456,11 @@ 24 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 25 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 26 + 25 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists From 5fcc95d0589e3b637aa070a28e0baac01597c58e Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:10:45 +0200 Subject: [PATCH 14/49] Update win11x64-enterprise-eval.xml --- assets/win11x64-enterprise-eval.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/assets/win11x64-enterprise-eval.xml b/assets/win11x64-enterprise-eval.xml index ae3384a..32dac2a 100644 --- a/assets/win11x64-enterprise-eval.xml +++ b/assets/win11x64-enterprise-eval.xml @@ -453,16 +453,11 @@ 24 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 25 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 26 + 25 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists From 09d84285d4c355f158aa31cb4b453cdb417a3bd9 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:16:37 +0200 Subject: [PATCH 15/49] Update winvistax86.xml --- assets/winvistax86.xml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/assets/winvistax86.xml b/assets/winvistax86.xml index c3a2302..07003fb 100644 --- a/assets/winvistax86.xml +++ b/assets/winvistax86.xml @@ -247,16 +247,11 @@ 22 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 23 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 24 + 23 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -264,4 +259,3 @@ - From 388fd4bb47ec3d795bc7c7b5d49166fa250c5874 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:16:58 +0200 Subject: [PATCH 16/49] Update winvistax86-ultimate.xml --- assets/winvistax86-ultimate.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/assets/winvistax86-ultimate.xml b/assets/winvistax86-ultimate.xml index 0cb6857..c3ec41a 100644 --- a/assets/winvistax86-ultimate.xml +++ b/assets/winvistax86-ultimate.xml @@ -247,16 +247,11 @@ 22 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 23 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 24 + 23 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists From 270602ba3758c31009b8906fec3b5da9edc6097f Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:17:19 +0200 Subject: [PATCH 17/49] Update winvistax86-enterprise.xml --- assets/winvistax86-enterprise.xml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/assets/winvistax86-enterprise.xml b/assets/winvistax86-enterprise.xml index 2e8b3b3..91c96df 100644 --- a/assets/winvistax86-enterprise.xml +++ b/assets/winvistax86-enterprise.xml @@ -247,16 +247,11 @@ 22 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 23 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 24 + 23 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -264,4 +259,3 @@ - From fdc3be9b463740ac99c555d8e119815fc3316f30 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:17:37 +0200 Subject: [PATCH 18/49] Remove hosts file entry command and adjust order --- assets/winvistax64.xml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/assets/winvistax64.xml b/assets/winvistax64.xml index f2dc848..d1de997 100644 --- a/assets/winvistax64.xml +++ b/assets/winvistax64.xml @@ -247,16 +247,11 @@ 22 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 23 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 24 + 23 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -264,4 +259,3 @@ - From afaa0000554b1847335b4da72d34b3f978de74cf Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:17:57 +0200 Subject: [PATCH 19/49] Update winvistax64-ultimate.xml --- assets/winvistax64-ultimate.xml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/assets/winvistax64-ultimate.xml b/assets/winvistax64-ultimate.xml index cdd73eb..78ed091 100644 --- a/assets/winvistax64-ultimate.xml +++ b/assets/winvistax64-ultimate.xml @@ -247,16 +247,11 @@ 22 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 23 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 24 + 23 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -264,4 +259,3 @@ - From da486f7c73e18cd56d17c7b0a8e18a3066cb1d87 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:18:18 +0200 Subject: [PATCH 20/49] Update first logon commands in XML configuration Removed command to add entry in hosts file and adjusted order of commands. --- assets/winvistax64-enterprise.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/assets/winvistax64-enterprise.xml b/assets/winvistax64-enterprise.xml index 67e02fc..d6ff627 100644 --- a/assets/winvistax64-enterprise.xml +++ b/assets/winvistax64-enterprise.xml @@ -247,16 +247,11 @@ 22 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 23 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 24 + 23 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists From 0fb95760149326250e2041300508f7b1a99dfdab Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:18:57 +0200 Subject: [PATCH 21/49] Update win81x64.xml --- assets/win81x64.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/assets/win81x64.xml b/assets/win81x64.xml index eb764dd..bf1ff5e 100644 --- a/assets/win81x64.xml +++ b/assets/win81x64.xml @@ -298,16 +298,11 @@ 16 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 17 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 18 + 17 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists From ff2b37514787051bdd59fadcdcd0574828f42b3e Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:19:18 +0200 Subject: [PATCH 22/49] Update first logon commands in win81x64-enterprise.xml Removed command to add entry in hosts file and adjusted order of commands. --- assets/win81x64-enterprise.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/assets/win81x64-enterprise.xml b/assets/win81x64-enterprise.xml index cebab90..db6eec9 100644 --- a/assets/win81x64-enterprise.xml +++ b/assets/win81x64-enterprise.xml @@ -291,16 +291,11 @@ 16 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 17 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 18 + 17 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists From 00ac2b40cb1c93a12c9de66f76b8292986c2774d Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:19:44 +0200 Subject: [PATCH 23/49] Remove hosts file entry command from XML --- assets/win81x64-enterprise-eval.xml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/assets/win81x64-enterprise-eval.xml b/assets/win81x64-enterprise-eval.xml index 498e332..a406f7f 100644 --- a/assets/win81x64-enterprise-eval.xml +++ b/assets/win81x64-enterprise-eval.xml @@ -288,16 +288,11 @@ 16 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 17 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 18 + 17 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -305,4 +300,3 @@ - From 785d4883d23f9e024be1b9f933ea6be49221d569 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:20:24 +0200 Subject: [PATCH 24/49] Update first logon commands in win7x86.xml Removed command to add entry in hosts file and adjusted order of subsequent commands. --- assets/win7x86.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/assets/win7x86.xml b/assets/win7x86.xml index 890d18d..bae5a8f 100644 --- a/assets/win7x86.xml +++ b/assets/win7x86.xml @@ -273,16 +273,11 @@ 17 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 18 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 19 + 18 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists From 0c2e32ecd2ac520374b011033b67b28c4f33d885 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:20:48 +0200 Subject: [PATCH 25/49] Update win7x86-ultimate.xml --- assets/win7x86-ultimate.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/assets/win7x86-ultimate.xml b/assets/win7x86-ultimate.xml index f9486b5..419a508 100644 --- a/assets/win7x86-ultimate.xml +++ b/assets/win7x86-ultimate.xml @@ -273,16 +273,11 @@ 17 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 18 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 19 + 18 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists From 429ad8aae76d42e146ece14080e46cedc6115cff Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:21:16 +0200 Subject: [PATCH 26/49] Update win7x86-enterprise.xml --- assets/win7x86-enterprise.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/assets/win7x86-enterprise.xml b/assets/win7x86-enterprise.xml index e7660ec..7ac8ef0 100644 --- a/assets/win7x86-enterprise.xml +++ b/assets/win7x86-enterprise.xml @@ -273,16 +273,11 @@ 17 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 18 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 19 + 18 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists From 39c42c432d39b46c5d51238abcf548e8fb7c48bb Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:21:41 +0200 Subject: [PATCH 27/49] Update win7x64.xml --- assets/win7x64.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/assets/win7x64.xml b/assets/win7x64.xml index db6a87f..3769dfd 100644 --- a/assets/win7x64.xml +++ b/assets/win7x64.xml @@ -273,16 +273,11 @@ 17 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 18 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 19 + 18 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists From 943dd61d3c42817107366c5074b886c10bd71f92 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:22:03 +0200 Subject: [PATCH 28/49] Update win7x64-ultimate.xml --- assets/win7x64-ultimate.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/assets/win7x64-ultimate.xml b/assets/win7x64-ultimate.xml index 679811f..2ee085a 100644 --- a/assets/win7x64-ultimate.xml +++ b/assets/win7x64-ultimate.xml @@ -273,16 +273,11 @@ 17 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 18 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 19 + 18 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists From a7fc8da778e6f18647336fee2999909a0438f7b9 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:22:25 +0200 Subject: [PATCH 29/49] Update win7x64-enterprise.xml --- assets/win7x64-enterprise.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/assets/win7x64-enterprise.xml b/assets/win7x64-enterprise.xml index ef5873d..b362a9f 100644 --- a/assets/win7x64-enterprise.xml +++ b/assets/win7x64-enterprise.xml @@ -273,16 +273,11 @@ 17 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 18 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 19 + 18 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists From b1468455b18ca4b26ae5b2b6cb4004286ede6ea4 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:22:47 +0200 Subject: [PATCH 30/49] Update win7x64-enterprise-eval.xml --- assets/win7x64-enterprise-eval.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/assets/win7x64-enterprise-eval.xml b/assets/win7x64-enterprise-eval.xml index 69ef032..c3cc15b 100644 --- a/assets/win7x64-enterprise-eval.xml +++ b/assets/win7x64-enterprise-eval.xml @@ -269,16 +269,11 @@ 17 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 18 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 19 + 18 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists From 811df6c00658033565f16a476544ff5c69c9eff5 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:23:25 +0200 Subject: [PATCH 31/49] Update win2025.xml --- assets/win2025.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/assets/win2025.xml b/assets/win2025.xml index bbee67f..8098192 100644 --- a/assets/win2025.xml +++ b/assets/win2025.xml @@ -345,16 +345,11 @@ 22 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 23 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 24 + 23 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists From 7f7ac69738ac599945cf5e99c0a42dbae889af11 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:23:47 +0200 Subject: [PATCH 32/49] Update win2025-eval.xml --- assets/win2025-eval.xml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/assets/win2025-eval.xml b/assets/win2025-eval.xml index 083812e..9ec3a7d 100644 --- a/assets/win2025-eval.xml +++ b/assets/win2025-eval.xml @@ -342,16 +342,11 @@ 22 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 23 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 24 + 23 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -359,4 +354,3 @@ - From 3861ba279140d0fa0b7c58970605d7a31c5db9d1 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:24:20 +0200 Subject: [PATCH 33/49] Modify first logon commands in win2022.xml Removed command to add entry in hosts file and adjusted order of commands. --- assets/win2022.xml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/assets/win2022.xml b/assets/win2022.xml index cb54e5f..9159226 100644 --- a/assets/win2022.xml +++ b/assets/win2022.xml @@ -330,16 +330,11 @@ 20 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 21 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 22 + 21 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -347,4 +342,3 @@ - From 6e22f57c1e4df4e59c859a47070693514a5ac597 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:24:40 +0200 Subject: [PATCH 34/49] Remove hosts file entry command and adjust order --- assets/win2022-eval.xml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/assets/win2022-eval.xml b/assets/win2022-eval.xml index e29daef..b525065 100644 --- a/assets/win2022-eval.xml +++ b/assets/win2022-eval.xml @@ -327,16 +327,11 @@ 20 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 21 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 22 + 21 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -344,4 +339,3 @@ - From 85f9a7a3156a39839d94eda4e33832d8212742a5 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:25:22 +0200 Subject: [PATCH 35/49] Update first logon commands in win2019.xml Removed command to add entry in hosts file and adjusted order of commands. --- assets/win2019.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/assets/win2019.xml b/assets/win2019.xml index 0e7faea..5133bed 100644 --- a/assets/win2019.xml +++ b/assets/win2019.xml @@ -330,16 +330,11 @@ 20 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 21 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 22 + 21 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists From 54225c35879a961952765a78acc85c38502620e5 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:25:41 +0200 Subject: [PATCH 36/49] Update win2019-hv.xml --- assets/win2019-hv.xml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/assets/win2019-hv.xml b/assets/win2019-hv.xml index 68c10cf..4c416cf 100644 --- a/assets/win2019-hv.xml +++ b/assets/win2019-hv.xml @@ -332,16 +332,11 @@ 20 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 21 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 22 + 21 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -349,4 +344,3 @@ - From 268b97be4f2ce0c8187574f0caeb837d08f8cb1f Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:26:04 +0200 Subject: [PATCH 37/49] Update win2019-eval.xml by removing hosts entry Removed command to add entry in hosts file and adjusted order of subsequent commands. --- assets/win2019-eval.xml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/assets/win2019-eval.xml b/assets/win2019-eval.xml index c518e92..cca0e35 100644 --- a/assets/win2019-eval.xml +++ b/assets/win2019-eval.xml @@ -327,16 +327,11 @@ 20 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 21 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 22 + 21 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -344,4 +339,3 @@ - From 1c2e8d8c774e06a3f2104a165c680c35e1d628c3 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:26:26 +0200 Subject: [PATCH 38/49] Update win2016.xml --- assets/win2016.xml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/assets/win2016.xml b/assets/win2016.xml index 398763c..6f75c66 100644 --- a/assets/win2016.xml +++ b/assets/win2016.xml @@ -326,16 +326,11 @@ 20 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 21 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 22 + 21 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -343,4 +338,3 @@ - From 4a6e0e4811eae8fdf58faeceb6a0348ce808ed50 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:26:50 +0200 Subject: [PATCH 39/49] Update command order and remove hosts entry command --- assets/win2016-eval.xml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/assets/win2016-eval.xml b/assets/win2016-eval.xml index ddaf919..568e9f5 100644 --- a/assets/win2016-eval.xml +++ b/assets/win2016-eval.xml @@ -323,16 +323,11 @@ 20 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 21 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 22 + 21 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -340,4 +335,3 @@ - From 9df185e22ea4a4e6fdb198320726fea188d7222a Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:27:28 +0200 Subject: [PATCH 40/49] Update win2012r2.xml --- assets/win2012r2.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/assets/win2012r2.xml b/assets/win2012r2.xml index a6560aa..1d1a5b6 100644 --- a/assets/win2012r2.xml +++ b/assets/win2012r2.xml @@ -306,16 +306,11 @@ 16 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 17 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 18 + 17 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists From 9882160b53e549e625c9f048ef42c73e435d814b Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:27:53 +0200 Subject: [PATCH 41/49] Remove hosts file entry addition from XML --- assets/win2012r2-eval.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/assets/win2012r2-eval.xml b/assets/win2012r2-eval.xml index f2f85ab..a9de3c6 100644 --- a/assets/win2012r2-eval.xml +++ b/assets/win2012r2-eval.xml @@ -303,16 +303,11 @@ 16 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 17 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 18 + 17 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists From f4cbf468070b10218a856cf46542a365e7561648 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:29:00 +0200 Subject: [PATCH 42/49] Refactor first logon commands in win2008r2.xml Removed command to add entry in hosts file and updated order for the shortcut creation command. --- assets/win2008r2.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/assets/win2008r2.xml b/assets/win2008r2.xml index df194be..a345bf8 100644 --- a/assets/win2008r2.xml +++ b/assets/win2008r2.xml @@ -288,16 +288,11 @@ 19 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 20 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 21 + 20 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists From 314287071f5e8a029fdfee9132d97be83e34aefb Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 16:29:30 +0200 Subject: [PATCH 43/49] Update win2008r2-eval.xml --- assets/win2008r2-eval.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/assets/win2008r2-eval.xml b/assets/win2008r2-eval.xml index f946b41..e7bd802 100644 --- a/assets/win2008r2-eval.xml +++ b/assets/win2008r2-eval.xml @@ -285,16 +285,11 @@ 19 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 20 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 21 + 20 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists From 17db1ac34c185cff11ab155e713db116d7785602 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 Oct 2025 18:58:17 +0200 Subject: [PATCH 44/49] feat: Support more network types (#1453) --- src/samba.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/samba.sh b/src/samba.sh index 7873b3e..d68d0b2 100644 --- a/src/samba.sh +++ b/src/samba.sh @@ -12,23 +12,23 @@ rm -rf /var/run/wsdd.pid [[ "$SAMBA" == [Nn]* ]] && return 0 [[ "$NETWORK" == [Nn]* ]] && return 0 -hostname="host.lan" -interfaces="dockerbridge" - -if [ -n "${SAMBA_INTERFACE:-}" ]; then - interfaces+=",$SAMBA_INTERFACE" -fi - if [[ "$DHCP" == [Yy1]* ]]; then hostname="$IP" interfaces="$VM_NET_DEV" -fi - -if [[ "${NETWORK,,}" == "user"* ]]; then - interfaces="lo" - if ! ip link set "$interfaces" multicast on >/dev/null; then - warn "Failed to enable multicast on loopback interface!" - fi +else + hostname="host.lan" + case "${NETWORK,,}" in + "user"* | "passt" | "slirp" ) + interfaces="lo" + if ! ip link set "$interfaces" multicast on >/dev/null; then + warn "Failed to enable multicast on loopback interface!" + fi ;; + *) + interfaces="dockerbridge" + if [ -n "${SAMBA_INTERFACE:-}" ]; then + interfaces+=",$SAMBA_INTERFACE" + fi ;; + esac fi html "Initializing shared folder..." From 3ab5c25152c4a49b19341a4416f033334d0be7d4 Mon Sep 17 00:00:00 2001 From: Kroese Date: Mon, 6 Oct 2025 13:22:28 +0200 Subject: [PATCH 45/49] feat: Use PID for Samba process (#1454) --- src/power.sh | 10 +++++++++- src/samba.sh | 24 +++++++++++++----------- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/src/power.sh b/src/power.sh index 8ea6ff0..1c2c223 100644 --- a/src/power.sh +++ b/src/power.sh @@ -103,11 +103,19 @@ finish() { pid="/var/run/tpm.pid" [ -s "$pid" ] && pKill "$(<"$pid")" + rm -f "$pid" pid="/var/run/wsdd.pid" [ -s "$pid" ] && pKill "$(<"$pid")" + rm -f "$pid" - fKill "smbd" + pid="/var/run/samba/nmbd.pid" + [ -s "$pid" ] && pKill "$(<"$pid")" + rm -f "$pid" + + pid="/var/run/samba/smbd.pid" + [ -s "$pid" ] && pKill "$(<"$pid")" + rm -f "$pid" closeNetwork diff --git a/src/samba.sh b/src/samba.sh index d68d0b2..c0ae8ac 100644 --- a/src/samba.sh +++ b/src/samba.sh @@ -7,7 +7,10 @@ set -Eeuo pipefail tmp="/tmp/smb" rm -rf "$tmp" -rm -rf /var/run/wsdd.pid + +rm -f /var/run/wsdd.pid +rm -f /var/run/samba/nmbd.pid +rm -f /var/run/samba/smbd.pid [[ "$SAMBA" == [Nn]* ]] && return 0 [[ "$NETWORK" == [Nn]* ]] && return 0 @@ -19,16 +22,15 @@ else hostname="host.lan" case "${NETWORK,,}" in "user"* | "passt" | "slirp" ) - interfaces="lo" - if ! ip link set "$interfaces" multicast on >/dev/null; then - warn "Failed to enable multicast on loopback interface!" - fi ;; - *) - interfaces="dockerbridge" - if [ -n "${SAMBA_INTERFACE:-}" ]; then - interfaces+=",$SAMBA_INTERFACE" - fi ;; + interfaces="lo" ;; + # if ! ip link set "$interfaces" multicast on >/dev/null; then + # warn "Failed to enable multicast on loopback interface!" + # fi ;; + *) interfaces="dockerbridge" ;; esac + if [ -n "${SAMBA_INTERFACE:-}" ]; then + interfaces+=",$SAMBA_INTERFACE" + fi fi html "Initializing shared folder..." @@ -37,7 +39,7 @@ html "Initializing shared folder..." addShare() { local dir="$1" local ref="$2" - local name="$3" + local name="$3" local comment="$4" mkdir -p "$dir" || return 1 From 588242b1759b8ac57fe5d2459e69ed6c6cdb84fa Mon Sep 17 00:00:00 2001 From: Kroese Date: Mon, 6 Oct 2025 13:44:05 +0200 Subject: [PATCH 46/49] fix: Use bridge name variable (#1455) --- src/samba.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/samba.sh b/src/samba.sh index c0ae8ac..687fd16 100644 --- a/src/samba.sh +++ b/src/samba.sh @@ -26,7 +26,7 @@ else # if ! ip link set "$interfaces" multicast on >/dev/null; then # warn "Failed to enable multicast on loopback interface!" # fi ;; - *) interfaces="dockerbridge" ;; + *) interfaces="$VM_NET_BRIDGE" ;; esac if [ -n "${SAMBA_INTERFACE:-}" ]; then interfaces+=",$SAMBA_INTERFACE" From c04851bbd483dd524257d8d1a5d881986143e2bf Mon Sep 17 00:00:00 2001 From: Kroese Date: Mon, 6 Oct 2025 13:45:14 +0200 Subject: [PATCH 47/49] feat: Remove entry from hosts file (#1456) --- assets/win10x64-enterprise-eval.xml | 7 +------ assets/win10x64-enterprise.xml | 7 +------ assets/win10x64-iot.xml | 7 +------ assets/win10x64-ltsc.xml | 7 +------ assets/win10x64.xml | 7 +------ assets/win11x64-enterprise-eval.xml | 7 +------ assets/win11x64-enterprise.xml | 7 +------ assets/win11x64-iot.xml | 7 +------ assets/win11x64-ltsc.xml | 7 +------ assets/win11x64.xml | 7 +------ assets/win2008r2-eval.xml | 7 +------ assets/win2008r2.xml | 7 +------ assets/win2012r2-eval.xml | 7 +------ assets/win2012r2.xml | 7 +------ assets/win2016-eval.xml | 8 +------- assets/win2016.xml | 8 +------- assets/win2019-eval.xml | 8 +------- assets/win2019-hv.xml | 8 +------- assets/win2019.xml | 7 +------ assets/win2022-eval.xml | 8 +------- assets/win2022.xml | 8 +------- assets/win2025-eval.xml | 8 +------- assets/win2025.xml | 7 +------ assets/win7x64-enterprise-eval.xml | 7 +------ assets/win7x64-enterprise.xml | 7 +------ assets/win7x64-ultimate.xml | 7 +------ assets/win7x64.xml | 7 +------ assets/win7x86-enterprise.xml | 7 +------ assets/win7x86-ultimate.xml | 7 +------ assets/win7x86.xml | 7 +------ assets/win81x64-enterprise-eval.xml | 8 +------- assets/win81x64-enterprise.xml | 7 +------ assets/win81x64.xml | 7 +------ assets/winvistax64-enterprise.xml | 7 +------ assets/winvistax64-ultimate.xml | 8 +------- assets/winvistax64.xml | 8 +------- assets/winvistax86-enterprise.xml | 8 +------- assets/winvistax86-ultimate.xml | 7 +------ assets/winvistax86.xml | 8 +------- src/define.sh | 11 ----------- src/install.sh | 4 ---- 41 files changed, 39 insertions(+), 261 deletions(-) diff --git a/assets/win10x64-enterprise-eval.xml b/assets/win10x64-enterprise-eval.xml index 7ea00ef..41e8a70 100644 --- a/assets/win10x64-enterprise-eval.xml +++ b/assets/win10x64-enterprise-eval.xml @@ -415,16 +415,11 @@ 21 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 22 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 23 + 22 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win10x64-enterprise.xml b/assets/win10x64-enterprise.xml index 733d1ec..c998592 100644 --- a/assets/win10x64-enterprise.xml +++ b/assets/win10x64-enterprise.xml @@ -418,16 +418,11 @@ 21 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 22 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 23 + 22 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win10x64-iot.xml b/assets/win10x64-iot.xml index 01534bb..bed9cbe 100644 --- a/assets/win10x64-iot.xml +++ b/assets/win10x64-iot.xml @@ -424,16 +424,11 @@ 21 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 22 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 23 + 22 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win10x64-ltsc.xml b/assets/win10x64-ltsc.xml index e0e6c98..6957f2b 100644 --- a/assets/win10x64-ltsc.xml +++ b/assets/win10x64-ltsc.xml @@ -421,16 +421,11 @@ 21 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 22 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 23 + 22 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win10x64.xml b/assets/win10x64.xml index 08e8c79..ef19c57 100644 --- a/assets/win10x64.xml +++ b/assets/win10x64.xml @@ -418,16 +418,11 @@ 21 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 22 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 23 + 22 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win11x64-enterprise-eval.xml b/assets/win11x64-enterprise-eval.xml index ae3384a..32dac2a 100644 --- a/assets/win11x64-enterprise-eval.xml +++ b/assets/win11x64-enterprise-eval.xml @@ -453,16 +453,11 @@ 24 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 25 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 26 + 25 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win11x64-enterprise.xml b/assets/win11x64-enterprise.xml index a9a192b..4c6746e 100644 --- a/assets/win11x64-enterprise.xml +++ b/assets/win11x64-enterprise.xml @@ -456,16 +456,11 @@ 24 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 25 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 26 + 25 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win11x64-iot.xml b/assets/win11x64-iot.xml index 5a1b8ae..91ab3ce 100644 --- a/assets/win11x64-iot.xml +++ b/assets/win11x64-iot.xml @@ -456,16 +456,11 @@ 24 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 25 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 26 + 25 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win11x64-ltsc.xml b/assets/win11x64-ltsc.xml index 8e4a969..7707cfb 100644 --- a/assets/win11x64-ltsc.xml +++ b/assets/win11x64-ltsc.xml @@ -456,16 +456,11 @@ 24 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 25 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 26 + 25 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win11x64.xml b/assets/win11x64.xml index 76e7a79..95d1d16 100644 --- a/assets/win11x64.xml +++ b/assets/win11x64.xml @@ -456,16 +456,11 @@ 24 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 25 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 26 + 25 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win2008r2-eval.xml b/assets/win2008r2-eval.xml index f946b41..e7bd802 100644 --- a/assets/win2008r2-eval.xml +++ b/assets/win2008r2-eval.xml @@ -285,16 +285,11 @@ 19 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 20 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 21 + 20 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win2008r2.xml b/assets/win2008r2.xml index df194be..a345bf8 100644 --- a/assets/win2008r2.xml +++ b/assets/win2008r2.xml @@ -288,16 +288,11 @@ 19 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 20 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 21 + 20 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win2012r2-eval.xml b/assets/win2012r2-eval.xml index f2f85ab..a9de3c6 100644 --- a/assets/win2012r2-eval.xml +++ b/assets/win2012r2-eval.xml @@ -303,16 +303,11 @@ 16 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 17 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 18 + 17 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win2012r2.xml b/assets/win2012r2.xml index a6560aa..1d1a5b6 100644 --- a/assets/win2012r2.xml +++ b/assets/win2012r2.xml @@ -306,16 +306,11 @@ 16 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 17 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 18 + 17 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win2016-eval.xml b/assets/win2016-eval.xml index ddaf919..568e9f5 100644 --- a/assets/win2016-eval.xml +++ b/assets/win2016-eval.xml @@ -323,16 +323,11 @@ 20 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 21 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 22 + 21 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -340,4 +335,3 @@ - diff --git a/assets/win2016.xml b/assets/win2016.xml index 398763c..6f75c66 100644 --- a/assets/win2016.xml +++ b/assets/win2016.xml @@ -326,16 +326,11 @@ 20 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 21 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 22 + 21 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -343,4 +338,3 @@ - diff --git a/assets/win2019-eval.xml b/assets/win2019-eval.xml index c518e92..cca0e35 100644 --- a/assets/win2019-eval.xml +++ b/assets/win2019-eval.xml @@ -327,16 +327,11 @@ 20 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 21 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 22 + 21 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -344,4 +339,3 @@ - diff --git a/assets/win2019-hv.xml b/assets/win2019-hv.xml index 68c10cf..4c416cf 100644 --- a/assets/win2019-hv.xml +++ b/assets/win2019-hv.xml @@ -332,16 +332,11 @@ 20 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 21 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 22 + 21 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -349,4 +344,3 @@ - diff --git a/assets/win2019.xml b/assets/win2019.xml index 0e7faea..5133bed 100644 --- a/assets/win2019.xml +++ b/assets/win2019.xml @@ -330,16 +330,11 @@ 20 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 21 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 22 + 21 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win2022-eval.xml b/assets/win2022-eval.xml index e29daef..b525065 100644 --- a/assets/win2022-eval.xml +++ b/assets/win2022-eval.xml @@ -327,16 +327,11 @@ 20 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 21 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 22 + 21 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -344,4 +339,3 @@ - diff --git a/assets/win2022.xml b/assets/win2022.xml index cb54e5f..9159226 100644 --- a/assets/win2022.xml +++ b/assets/win2022.xml @@ -330,16 +330,11 @@ 20 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 21 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 22 + 21 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -347,4 +342,3 @@ - diff --git a/assets/win2025-eval.xml b/assets/win2025-eval.xml index 083812e..9ec3a7d 100644 --- a/assets/win2025-eval.xml +++ b/assets/win2025-eval.xml @@ -342,16 +342,11 @@ 22 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 23 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 24 + 23 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -359,4 +354,3 @@ - diff --git a/assets/win2025.xml b/assets/win2025.xml index bbee67f..8098192 100644 --- a/assets/win2025.xml +++ b/assets/win2025.xml @@ -345,16 +345,11 @@ 22 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 23 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 24 + 23 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win7x64-enterprise-eval.xml b/assets/win7x64-enterprise-eval.xml index 69ef032..c3cc15b 100644 --- a/assets/win7x64-enterprise-eval.xml +++ b/assets/win7x64-enterprise-eval.xml @@ -269,16 +269,11 @@ 17 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 18 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 19 + 18 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win7x64-enterprise.xml b/assets/win7x64-enterprise.xml index ef5873d..b362a9f 100644 --- a/assets/win7x64-enterprise.xml +++ b/assets/win7x64-enterprise.xml @@ -273,16 +273,11 @@ 17 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 18 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 19 + 18 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win7x64-ultimate.xml b/assets/win7x64-ultimate.xml index 679811f..2ee085a 100644 --- a/assets/win7x64-ultimate.xml +++ b/assets/win7x64-ultimate.xml @@ -273,16 +273,11 @@ 17 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 18 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 19 + 18 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win7x64.xml b/assets/win7x64.xml index db6a87f..3769dfd 100644 --- a/assets/win7x64.xml +++ b/assets/win7x64.xml @@ -273,16 +273,11 @@ 17 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 18 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 19 + 18 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win7x86-enterprise.xml b/assets/win7x86-enterprise.xml index e7660ec..7ac8ef0 100644 --- a/assets/win7x86-enterprise.xml +++ b/assets/win7x86-enterprise.xml @@ -273,16 +273,11 @@ 17 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 18 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 19 + 18 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win7x86-ultimate.xml b/assets/win7x86-ultimate.xml index f9486b5..419a508 100644 --- a/assets/win7x86-ultimate.xml +++ b/assets/win7x86-ultimate.xml @@ -273,16 +273,11 @@ 17 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 18 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 19 + 18 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win7x86.xml b/assets/win7x86.xml index 890d18d..bae5a8f 100644 --- a/assets/win7x86.xml +++ b/assets/win7x86.xml @@ -273,16 +273,11 @@ 17 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 18 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 19 + 18 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win81x64-enterprise-eval.xml b/assets/win81x64-enterprise-eval.xml index 498e332..a406f7f 100644 --- a/assets/win81x64-enterprise-eval.xml +++ b/assets/win81x64-enterprise-eval.xml @@ -288,16 +288,11 @@ 16 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 17 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 18 + 17 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -305,4 +300,3 @@ - diff --git a/assets/win81x64-enterprise.xml b/assets/win81x64-enterprise.xml index cebab90..db6eec9 100644 --- a/assets/win81x64-enterprise.xml +++ b/assets/win81x64-enterprise.xml @@ -291,16 +291,11 @@ 16 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 17 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 18 + 17 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win81x64.xml b/assets/win81x64.xml index eb764dd..bf1ff5e 100644 --- a/assets/win81x64.xml +++ b/assets/win81x64.xml @@ -298,16 +298,11 @@ 16 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 17 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 18 + 17 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/winvistax64-enterprise.xml b/assets/winvistax64-enterprise.xml index 67e02fc..d6ff627 100644 --- a/assets/winvistax64-enterprise.xml +++ b/assets/winvistax64-enterprise.xml @@ -247,16 +247,11 @@ 22 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 23 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 24 + 23 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/winvistax64-ultimate.xml b/assets/winvistax64-ultimate.xml index cdd73eb..78ed091 100644 --- a/assets/winvistax64-ultimate.xml +++ b/assets/winvistax64-ultimate.xml @@ -247,16 +247,11 @@ 22 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 23 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 24 + 23 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -264,4 +259,3 @@ - diff --git a/assets/winvistax64.xml b/assets/winvistax64.xml index f2dc848..d1de997 100644 --- a/assets/winvistax64.xml +++ b/assets/winvistax64.xml @@ -247,16 +247,11 @@ 22 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 23 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 24 + 23 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -264,4 +259,3 @@ - diff --git a/assets/winvistax86-enterprise.xml b/assets/winvistax86-enterprise.xml index 2e8b3b3..91c96df 100644 --- a/assets/winvistax86-enterprise.xml +++ b/assets/winvistax86-enterprise.xml @@ -247,16 +247,11 @@ 22 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 23 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 24 + 23 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -264,4 +259,3 @@ - diff --git a/assets/winvistax86-ultimate.xml b/assets/winvistax86-ultimate.xml index 0cb6857..c3ec41a 100644 --- a/assets/winvistax86-ultimate.xml +++ b/assets/winvistax86-ultimate.xml @@ -247,16 +247,11 @@ 22 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 23 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 24 + 23 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/winvistax86.xml b/assets/winvistax86.xml index c3a2302..07003fb 100644 --- a/assets/winvistax86.xml +++ b/assets/winvistax86.xml @@ -247,16 +247,11 @@ 22 - cmd /C echo 20.20.20.1 host.lan >> %WINDIR%\system32\drivers\etc\hosts - Add entry in hosts file - - - 23 cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data Create desktop shortcut to shared folder - 24 + 23 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -264,4 +259,3 @@ - diff --git a/src/define.sh b/src/define.sh index 6edc4bd..d094037 100644 --- a/src/define.sh +++ b/src/define.sh @@ -1584,9 +1584,6 @@ prepareInstall() { [ -n "$PASSWORD" ] && password=$(echo "$PASSWORD" | sed 's/"//g') [ -z "$password" ] && password="admin" - local ip="20.20.20.1" - [ -n "${VM_NET_IP:-}" ] && ip="${VM_NET_IP%.*}.1" - find "$target" -maxdepth 1 -type f -iname winnt.sif -exec rm {} \; { echo "[Data]" @@ -1769,14 +1766,6 @@ prepareInstall() { echo "" echo "Call Domain.MoveHere(LocalAdminADsPath, \"$username\")" echo "" - echo "With (CreateObject(\"Scripting.FileSystemObject\"))" - echo " SysRoot = WshShell.ExpandEnvironmentStrings(\"%SystemRoot%\")" - echo " Set oFile = .OpenTextFile(SysRoot & \"\system32\drivers\etc\hosts\", 8, true)" - echo " oFile.Write(\"$ip host.lan\")" - echo " oFile.Close()" - echo " Set oFile = Nothing" - echo "End With" - echo "" echo "Set oLink = WshShell.CreateShortcut(WshShell.ExpandEnvironmentStrings(\"%userprofile%\\Desktop\\Shared.lnk\"))" echo "With oLink" echo " .TargetPath = \"\\\\host.lan\\Data\"" diff --git a/src/install.sh b/src/install.sh index c3fa8ef..396911f 100644 --- a/src/install.sh +++ b/src/install.sh @@ -756,10 +756,6 @@ updateXML() { local language="$2" local culture region user admin pass keyboard - if [ -n "${VM_NET_IP:-}" ]; then - sed -i "s/ 20.20.20.1 / ${VM_NET_IP%.*}.1 /g" "$asset" - fi - [ -z "$HEIGHT" ] && HEIGHT="720" [ -z "$WIDTH" ] && WIDTH="1280" From 7a0be8950ceaac3cadba9497c9861094c53642fe Mon Sep 17 00:00:00 2001 From: Kroese Date: Mon, 6 Oct 2025 17:37:11 +0200 Subject: [PATCH 48/49] feat: Set Samba socket Added socket variable assignment and updated conditions for network handling. --- src/samba.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/samba.sh b/src/samba.sh index 687fd16..9ca1334 100644 --- a/src/samba.sh +++ b/src/samba.sh @@ -16,17 +16,18 @@ rm -f /var/run/samba/smbd.pid [[ "$NETWORK" == [Nn]* ]] && return 0 if [[ "$DHCP" == [Yy1]* ]]; then + socket="$IP" hostname="$IP" interfaces="$VM_NET_DEV" else hostname="host.lan" case "${NETWORK,,}" in "user"* | "passt" | "slirp" ) - interfaces="lo" ;; - # if ! ip link set "$interfaces" multicast on >/dev/null; then - # warn "Failed to enable multicast on loopback interface!" - # fi ;; - *) interfaces="$VM_NET_BRIDGE" ;; + interfaces="lo" + socket="127.0.0.1" ;; + *) + socket="$VM_NET_IP" + interfaces="$VM_NET_BRIDGE" ;; esac if [ -n "${SAMBA_INTERFACE:-}" ]; then interfaces+=",$SAMBA_INTERFACE" @@ -100,6 +101,7 @@ addShare() { echo " follow symlinks = yes" echo " wide links = yes" echo " unix extensions = no" + echo " socket address = $socket" echo "" echo " # disable printing services" echo " load printers = no" @@ -160,6 +162,12 @@ if [[ "$SAMBA_DEBUG" == [Yy1]* ]]; then tail -fn +0 /var/log/samba/log.smbd & fi +case "${NETWORK,,}" in + "user"* | "passt" | "slirp" ) + return 0 ;; +esac + + if [[ "${BOOT_MODE:-}" == "windows_legacy" ]]; then # Enable NetBIOS on Windows 7 and lower From a098158bebf2d8ad3c31fd3d49ba364b93bc27ef Mon Sep 17 00:00:00 2001 From: Kroese Date: Mon, 6 Oct 2025 18:34:43 +0200 Subject: [PATCH 49/49] fix: Remove variable --- src/samba.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/samba.sh b/src/samba.sh index 9ca1334..69ad475 100644 --- a/src/samba.sh +++ b/src/samba.sh @@ -22,7 +22,7 @@ if [[ "$DHCP" == [Yy1]* ]]; then else hostname="host.lan" case "${NETWORK,,}" in - "user"* | "passt" | "slirp" ) + "passt" | "slirp" ) interfaces="lo" socket="127.0.0.1" ;; *) @@ -167,7 +167,6 @@ case "${NETWORK,,}" in return 0 ;; esac - if [[ "${BOOT_MODE:-}" == "windows_legacy" ]]; then # Enable NetBIOS on Windows 7 and lower