From 92b65fab52051bfe94a7b93bc0fae3476f382eae Mon Sep 17 00:00:00 2001
From: "Michael H.G. Schmidt" <michael@schmidt2.de>
Date: Sun, 25 Dec 2022 14:00:19 +0100
Subject: [PATCH] bugfix

---
 wim/StartCustomSetup.cmd | 8 +++++---
 wim/finish-image.cmd     | 3 ++-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/wim/StartCustomSetup.cmd b/wim/StartCustomSetup.cmd
index 8839b7c..0e80a8f 100644
--- a/wim/StartCustomSetup.cmd
+++ b/wim/StartCustomSetup.cmd
@@ -17,15 +17,17 @@ for %%D in (A B D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
   if EXIST %%D:\%BATCH% (
     echo EXECUTING %%D:\%BATCH% ...
     cd /D %%D:\
-    start /MIN cmd /C %BATCH%
+    echo start /MIN cmd /C %BATCH%
     GOTO END 
   ) else (
     echo INFO: %BATCH% not found on drive %%D!
-    echo INFO: Calling the GUI helper to prompt the user to use a different USB port ...
-    prompt-user "Custom setup script NOT found! Please disconnect the USB stick and connect it to another USB port. Then click on OK."
   )
 
 )
+
+echo INFO: Calling the GUI helper to prompt the user to use a different USB port ...
+prompt-user "Custom setup script NOT found! Please disconnect the USB stick and connect it to another USB port. Then click on OK."
+
 goto loop
 
 :END
diff --git a/wim/finish-image.cmd b/wim/finish-image.cmd
index 28e131e..1aae351 100644
--- a/wim/finish-image.cmd
+++ b/wim/finish-image.cmd
@@ -17,7 +17,8 @@ mkdir %IMAGE%\Windows\Setup\scripts 1>nul 2>nul
 echo [%0] INFO: copying scripts to %IMAGE%\Windows\Setup\scripts ...
 copy /Y SetupComplete.cmd %IMAGE%\Windows\Setup\scripts
 copy /Y StartCustomSetup.cmd %IMAGE%\Windows\Setup\scripts
-copy /Y ..\tools\prompt-user.exe %IMAGE%\Windows\Setup\scripts
+copy /Y ..\tools\prompt-user.exe %IMAGE%\Windows
+
 if %ERRORLEVEL% NEQ 0 (
   echo [%0] ERROR: while copying scripts to IMAGE
   exit /b