w10install/wimscripts/finish-image.cmd
Michael H.G. Schmidt 98ee5c87f7 .
2020-12-25 20:44:39 +01:00

25 lines
682 B
Batchfile

@echo off
set SOURCES=c:\TEMP\Win10\sources
set MNT=c:\TEMP\WIM
rd /S /Q %MNT%\Windows\Setup\scripts 1>nul 2>nul
mkdir %MNT%\Windows\Setup\scripts 1>nul 2>nul
rem copy SetupComplete script ...
copy /Y SetupComplete.cmd %MNT%\Windows\Setup\scripts
if %errorlevel% neq 0 exit /b %errorlevel%
dir %MNT%\Windows\Setup\scripts
dism /Image:%MNT% /Cleanup-Image /StartComponentCleanup /ResetBase
dism /Unmount-Wim /MountDir:%MNT% /Commit
dism /Export-Image ^
/SourceImageFile:%SOURCES%\install.wim ^
/DestinationImageFile:%SOURCES%\install_FINAL.esd ^
/SourceName:"Windows 10 Pro" ^
/Compress:Recovery ^
/CheckIntegrity
del /Q %SOURCES%\install.wim