From f0d67b346eddd4b8ace9339181881e9dbd4f3e0b Mon Sep 17 00:00:00 2001 From: "Michael H.G. Schmidt" Date: Fri, 29 Jan 2021 11:57:12 +0100 Subject: [PATCH] . --- MakeIso.cmd | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ PrepareStick.cmd | 14 ++++---------- 2 files changed, 52 insertions(+), 10 deletions(-) create mode 100644 MakeIso.cmd diff --git a/MakeIso.cmd b/MakeIso.cmd new file mode 100644 index 0000000..151da1f --- /dev/null +++ b/MakeIso.cmd @@ -0,0 +1,48 @@ +@echo off +set OSCDPATH="%ProgramFiles(x86)%\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg" +set OSLABEL=WIN10-AUTO +set ISOFILE=c:\temp\%OSLABEL%.iso + +rem =================== +rem COMMANDLINE CHECKS +rem =================== + +IF %1.==. GOTO USAGE +set USBDRIVE=%1 + +if /I %USBDRIVE% == C: ( + echo ERROR: cannot use drive %USBDRIVE% ! + exit /b +) + +echo using drive %USBDRIVE% ... + +if NOT EXIST %USBDRIVE% ( + echo ERROR: drive %USBDRIVE% not found! + exit /b +) + +rem ===== +rem MAIN +rem ===== + +del /F %ISOFILE% + +if EXIST %ISOFILE% ( + echo ERROR: cannot delete/create %ISOFILE%! + echo HINT: maybe it is mounted by Virtualbox or some other tool? + exit /b +) + +%OSCDPATH%\oscdimg -l%OSLABEL% -m -u2 -b%OSCDPATH%\etfsboot.com %USBDRIVE% %ISOFILE% + +rem ===== +rem END +rem ===== +GOTO END + +:USAGE +echo "usage: %0 " + +:END + diff --git a/PrepareStick.cmd b/PrepareStick.cmd index 5802278..7f6c62d 100644 --- a/PrepareStick.cmd +++ b/PrepareStick.cmd @@ -8,21 +8,11 @@ rem =================== IF %1.==. GOTO USAGE set USBDRIVE=%1 -if NOT EXIST %USBDRIVE% ( - echo ERROR: file %USBDRIVE% does not exist! - exit /b -) - if /I %USBDRIVE% == C: ( echo ERROR: cannot use drive %USBDRIVE% ! exit /b ) - -rem ===== -rem MAIN -rem ===== - echo using drive %USBDRIVE% ... if NOT EXIST %USBDRIVE% ( @@ -30,6 +20,10 @@ if NOT EXIST %USBDRIVE% ( exit /b ) +rem ===== +rem MAIN +rem ===== + set answer= :ask set /p answer="BIOS or UEFI setup (B/U)? "