2021-01-10 15:49:37 +01:00
|
|
|
@echo off
|
|
|
|
set SOURCES=c:\TEMP\W10\sources
|
2021-03-28 00:10:18 +01:00
|
|
|
set ESD=%SOURCES%\install.esd
|
|
|
|
set WIM=%SOURCES%\install.wim
|
2021-01-10 15:49:37 +01:00
|
|
|
|
2021-03-28 00:10:18 +01:00
|
|
|
if NOT EXIST %ESD% (
|
2021-03-16 23:23:06 +01:00
|
|
|
echo.
|
2021-03-28 00:10:18 +01:00
|
|
|
echo [%0] WARNING: %ESD% NOT found!
|
2021-03-28 00:03:35 +01:00
|
|
|
|
|
|
|
rem search for "install.wim" ...
|
2021-03-28 00:10:18 +01:00
|
|
|
if NOT EXIST %WIM% (
|
|
|
|
echo [%0] ERROR: %WIM% also NOT found!
|
2021-03-28 00:03:35 +01:00
|
|
|
exit /b
|
|
|
|
) else (
|
|
|
|
rem rename WIM file ...
|
2021-03-28 00:10:18 +01:00
|
|
|
move /Y %WIM% %SOURCES%\install-orig.wim
|
2021-03-28 00:04:45 +01:00
|
|
|
)
|
2021-03-16 23:23:06 +01:00
|
|
|
)
|
|
|
|
|
2021-03-28 00:03:35 +01:00
|
|
|
echo deleting "old" install.wim ...
|
2021-03-28 00:10:18 +01:00
|
|
|
del %WIM% 1>nul 2>nul
|
2021-01-10 15:49:37 +01:00
|
|
|
|
2021-03-28 00:10:18 +01:00
|
|
|
echo exporting image from %SOURCES%\install-orig.wim ...
|
2021-01-10 15:49:37 +01:00
|
|
|
dism /Export-Image ^
|
2021-03-28 00:10:18 +01:00
|
|
|
/SourceImageFile: %SOURCES%\install-orig.wim ^
|
|
|
|
/DestinationImageFile:%WIM% ^
|
2021-01-10 15:49:37 +01:00
|
|
|
/SourceName:"Windows 10 Pro" ^
|
2021-03-28 00:03:35 +01:00
|
|
|
/Compress:None ^
|
2021-01-10 15:49:37 +01:00
|
|
|
/CheckIntegrity
|
|
|
|
|