w10install/PrepareStick.cmd

36 lines
886 B
Batchfile
Raw Normal View History

2020-12-25 20:08:46 +01:00
@echo off
2021-01-10 00:22:42 +01:00
set TARGET=D:\
2020-12-25 20:08:46 +01:00
set SOURCES=c:\TEMP\Win10\sources
echo ####### %0 #######
2021-01-10 00:22:42 +01:00
echo using drive %TARGET% ...
if NOT EXIST %TARGET% (
echo ERROR: drive %TARGET% not found!
exit /b
)
:ask
set /p answer="BIOS or UEFI setup (B/U)? "
if /i "%answer:~,1%" EQU "B" (
copy /Y autounattend_BIOS.xml %TARGET%\autounattend.xml
goto cont
)
if /i "%answer:~,1%" EQU "U" (
copy /Y autounattend_UEFI.xml %TARGET%\autounattend.xml
goto cont
)
echo Please type B for BIOS or U for UEFI setup.
goto ask
:cont
2020-12-25 20:08:46 +01:00
if EXIST %SOURCES%\install_FINAL.esd (
robocopy %SOURCES% %TARGET%\sources install_FINAL.esd
del /Q %TARGET%\sources\install.esd 1>nul 2>nul
2021-01-10 00:22:42 +01:00
move /Y %TARGET%\sources\install_FINAL.esd %TARGET%\sources\install.esd
move /Y %SOURCES%\install_FINAL.esd %SOURCES%\install_FINAL_copy.esd
2020-12-25 20:08:46 +01:00
)
echo ####### %0 #######