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-03-28 00:29:33 +01:00
|
|
|
set W10PRO=%SOURCES%\w10pro.wim
|
|
|
|
set STATEFILE=%SOURCES%\w10pro.txt
|
|
|
|
|
2021-03-28 00:45:34 +01:00
|
|
|
|
|
|
|
if EXIST %STATEFILE% (
|
|
|
|
|
|
|
|
echo.
|
|
|
|
echo INFO: found %STATEFILE%
|
|
|
|
echo nothing todo. all work was already done.
|
|
|
|
echo READY.
|
|
|
|
exit /b
|
|
|
|
|
|
|
|
)
|
|
|
|
|
2021-03-28 00:29:33 +01:00
|
|
|
if EXIST %ESD% (
|
|
|
|
|
|
|
|
echo.
|
|
|
|
echo INFO: found %ESD%
|
|
|
|
|
|
|
|
echo deleting "old" install.wim ...
|
|
|
|
del %WIM% 1>nul 2>nul
|
|
|
|
|
|
|
|
echo exporting image from %ESD% ...
|
|
|
|
dism /Export-Image ^
|
|
|
|
/SourceImageFile:%ESD% ^
|
|
|
|
/DestinationImageFile:%WIM% ^
|
|
|
|
/SourceName:"Windows 10 Pro" ^
|
2021-03-28 00:32:53 +01:00
|
|
|
/Compress:Max ^
|
2021-03-28 00:29:33 +01:00
|
|
|
/CheckIntegrity
|
|
|
|
|
|
|
|
echo.
|
|
|
|
echo READY.
|
|
|
|
exit /b
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
if EXIST %WIM% (
|
|
|
|
|
2021-03-28 00:41:45 +01:00
|
|
|
rem cleanup ...
|
|
|
|
del /F %W10PRO% 1>nul 2>nul
|
|
|
|
|
2021-03-28 00:29:33 +01:00
|
|
|
echo.
|
2021-03-28 00:41:45 +01:00
|
|
|
echo INFO: found %WIM%
|
2021-03-28 00:29:33 +01:00
|
|
|
|
|
|
|
echo exporting image from %WIM% ...
|
|
|
|
dism /Export-Image ^
|
|
|
|
/SourceImageFile:%WIM% ^
|
|
|
|
/DestinationImageFile:%W10PRO% ^
|
|
|
|
/SourceName:"Windows 10 Pro" ^
|
2021-03-28 00:32:53 +01:00
|
|
|
/Compress:Max ^
|
2021-03-28 00:29:33 +01:00
|
|
|
/CheckIntegrity
|
|
|
|
|
2021-03-28 00:41:45 +01:00
|
|
|
attrib -R %WIM%
|
2021-03-28 00:29:33 +01:00
|
|
|
move /Y %W10PRO% %WIM%
|
|
|
|
echo all done >%STATEFILE%
|
2021-01-10 15:49:37 +01:00
|
|
|
|
2021-03-16 23:23:06 +01:00
|
|
|
echo.
|
2021-03-28 00:29:33 +01:00
|
|
|
echo READY.
|
|
|
|
exit /b
|
|
|
|
|
2021-03-16 23:23:06 +01:00
|
|
|
)
|
|
|
|
|
2021-03-28 00:29:33 +01:00
|
|
|
set ERRORLEVEL=9009
|
2021-01-10 15:49:37 +01:00
|
|
|
|