w10install/09_MakeISOfromStick.cmd

54 lines
939 B
Batchfile
Raw Normal View History

2021-01-29 11:57:12 +01:00
@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
2021-03-18 00:08:40 +01:00
IF %1.==. GOTO USAGE
2021-03-17 00:22:50 +01:00
echo ===================
echo Make ISO file ...
echo ===================
echo.
2021-01-29 11:57:12 +01:00
set USBDRIVE=%1
if /I %USBDRIVE% == C: (
echo ERROR: cannot use drive %USBDRIVE% !
exit /b
)
2021-03-17 00:22:50 +01:00
echo using drive [ %USBDRIVE% ] ...
2021-01-29 11:57:12 +01:00
if NOT EXIST %USBDRIVE% (
echo ERROR: drive %USBDRIVE% not found!
exit /b
)
rem =====
rem MAIN
rem =====
2021-03-17 00:22:50 +01:00
del /F %ISOFILE% 2>nul
2021-01-29 11:57:12 +01:00
if EXIST %ISOFILE% (
echo ERROR: cannot delete/create %ISOFILE%!
echo HINT: maybe it is mounted by Virtualbox or some other tool?
exit /b
)
2021-03-28 19:53:17 +02:00
%OSCDPATH%\oscdimg -l%OSLABEL% -m -u2 -b%OSCDPATH%\etfsboot.com %USBDRIVE%\ %ISOFILE%
2021-01-29 11:57:12 +01:00
2021-03-17 00:22:50 +01:00
echo READY.
echo.
2021-01-29 11:57:12 +01:00
rem =====
rem END
rem =====
GOTO END
:USAGE
echo "usage: %0 <USBDRIVE>"
:END