2021-03-16 23:51:45 +01:00
|
|
|
@echo off
|
2023-01-04 15:20:47 +01:00
|
|
|
set ARG1=null
|
2023-02-09 11:41:28 +01:00
|
|
|
set NTLITE="%ProgramFiles%\NTLite\NTLite.exe"
|
2023-02-06 17:03:13 +01:00
|
|
|
set SOURCES=c:\TEMP\W10\sources
|
2023-02-07 16:39:44 +01:00
|
|
|
set IMAGEFILE=install.wim
|
2023-02-06 17:03:13 +01:00
|
|
|
set T=c:\temp
|
2023-01-12 19:07:28 +01:00
|
|
|
|
2023-01-04 15:20:47 +01:00
|
|
|
IF "%~1" NEQ "" set ARG1=%1
|
|
|
|
if /I %ARG1% == /? goto usage
|
2021-03-16 23:51:45 +01:00
|
|
|
|
2022-12-29 10:49:17 +01:00
|
|
|
rem check for the image directory ...
|
|
|
|
if NOT EXIST image (
|
|
|
|
echo ERROR: directory [ image ] NOT FOUND!
|
2021-03-16 23:51:45 +01:00
|
|
|
echo ABORT.
|
|
|
|
exit /b
|
|
|
|
) else (
|
2022-12-29 10:49:17 +01:00
|
|
|
cd image
|
2021-03-16 23:51:45 +01:00
|
|
|
)
|
|
|
|
|
2023-01-04 15:20:47 +01:00
|
|
|
echo =========================================
|
|
|
|
echo START of MAIN image creation process ...
|
|
|
|
echo =========================================
|
2021-03-16 23:51:45 +01:00
|
|
|
echo.
|
|
|
|
|
|
|
|
rem start scripts
|
|
|
|
for %%S in (
|
|
|
|
export-image.cmd
|
|
|
|
mount-image.cmd
|
|
|
|
) do (
|
|
|
|
echo ########## calling [ %%S ] ##########
|
2023-02-01 17:27:09 +01:00
|
|
|
call %%S || ( cd .. ; exit /b )
|
2021-03-16 23:51:45 +01:00
|
|
|
echo.
|
2023-01-04 15:20:47 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
if /I %ARG1% == /R (
|
|
|
|
echo ########## calling [ remove-apps.cmd ] ##########
|
|
|
|
call remove-apps.cmd
|
|
|
|
echo.
|
2021-03-16 23:51:45 +01:00
|
|
|
)
|
|
|
|
|
2023-01-04 15:20:47 +01:00
|
|
|
echo ########## calling [ finish-image.cmd ] ##########
|
2023-02-01 17:27:09 +01:00
|
|
|
call finish-image.cmd || ( cd .. ; exit /b )
|
2023-01-04 15:20:47 +01:00
|
|
|
echo.
|
|
|
|
|
2023-02-06 17:03:13 +01:00
|
|
|
rem go back ...
|
|
|
|
cd ..
|
|
|
|
|
2022-12-25 20:52:46 +01:00
|
|
|
echo checking for NTLite ...
|
|
|
|
if NOT EXIST %NTLITE% (
|
|
|
|
echo.
|
|
|
|
echo ERROR: program [ NTLite ] NOT FOUND!
|
|
|
|
) else (
|
|
|
|
echo calling NTLite ...
|
|
|
|
rem stupid windows: the "" are needed or NTlite will not be started - sigh -
|
2023-02-20 10:35:26 +01:00
|
|
|
start /B "" %NTLITE% /LoadImage:%SOURCES%\%IMAGEFILE%
|
2022-12-25 20:52:46 +01:00
|
|
|
)
|
|
|
|
|
2021-03-16 23:51:45 +01:00
|
|
|
echo.
|
2021-03-17 00:22:50 +01:00
|
|
|
echo ======
|
|
|
|
echo READY.
|
|
|
|
echo ======
|
2023-01-04 15:20:47 +01:00
|
|
|
GOTO END
|
2021-03-16 23:51:45 +01:00
|
|
|
|
2023-01-04 15:20:47 +01:00
|
|
|
:USAGE
|
2023-01-20 21:50:27 +01:00
|
|
|
echo.
|
2023-01-04 15:20:47 +01:00
|
|
|
echo "usage: %0 [/R|/?]"
|
|
|
|
echo " /R = remove apps from main image"
|
|
|
|
echo " /? = show help "
|
|
|
|
echo.
|
|
|
|
:END
|
2023-01-22 20:09:39 +01:00
|
|
|
|