2021-01-10 16:50:35 +01:00
|
|
|
@echo off
|
2023-02-20 07:56:50 +01:00
|
|
|
set LOG=%SystemDrive%\SearchAutoconfig.txt
|
|
|
|
set BATCH=StartAutoconfig.cmd
|
2021-01-10 16:50:35 +01:00
|
|
|
|
|
|
|
if not "%1"=="STDOUT_TO_FILE" %0 STDOUT_TO_FILE %* 1>%LOG% 2>&1
|
|
|
|
shift /1
|
|
|
|
|
|
|
|
echo ####### %0 #######
|
|
|
|
date /t
|
|
|
|
time /t
|
|
|
|
echo.
|
|
|
|
|
2023-02-20 07:56:50 +01:00
|
|
|
rem scan for the USB media (infinite) ...
|
2022-12-24 15:56:30 +01:00
|
|
|
:loop
|
2021-01-10 16:50:35 +01:00
|
|
|
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:\
|
2022-12-25 14:22:12 +01:00
|
|
|
start /MIN cmd /C %BATCH%
|
2021-01-10 16:50:35 +01:00
|
|
|
GOTO END
|
|
|
|
) else (
|
|
|
|
echo INFO: %BATCH% not found on drive %%D!
|
|
|
|
)
|
|
|
|
|
|
|
|
)
|
2022-12-25 14:00:19 +01:00
|
|
|
|
|
|
|
echo INFO: Calling the GUI helper to prompt the user to use a different USB port ...
|
2023-02-20 07:56:50 +01:00
|
|
|
prompt-user "Custom setup script NOT found! Please disconnect the USB media and connect it to another USB port. Then click on OK."
|
2022-12-25 14:00:19 +01:00
|
|
|
|
2022-12-24 15:56:30 +01:00
|
|
|
goto loop
|
2021-01-10 16:50:35 +01:00
|
|
|
|
|
|
|
:END
|
|
|
|
|
|
|
|
echo.
|
|
|
|
date /t
|
|
|
|
time /t
|
|
|
|
echo ####### %0 #######
|
|
|
|
|