From 6b5ff9e156d9226327b79347f676660f0337fa81 Mon Sep 17 00:00:00 2001 From: "Michael H.G. Schmidt" Date: Wed, 31 Mar 2021 10:28:39 +0200 Subject: [PATCH] bugfix --- 06_Copy2Stick.cmd | 20 ++++---------------- wim/finish-image.cmd | 11 +++++++---- 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/06_Copy2Stick.cmd b/06_Copy2Stick.cmd index 905f0ba..afaf912 100644 --- a/06_Copy2Stick.cmd +++ b/06_Copy2Stick.cmd @@ -1,8 +1,7 @@ @echo off set SOURCES=c:\TEMP\W10\sources set BOOT=boot.wim -set IMAGE=install_FINAL.esd -set ALTIMAGE=install_FINAL_lastrun.esd +set IMAGE=install.esd IF %1.==. GOTO USAGE @@ -87,22 +86,11 @@ if EXIST %SOURCES%\%IMAGE% ( echo copying [ %IMAGE% ] to drive %USBDRIVE% ... robocopy %SOURCES% %USBDRIVE%\sources %IMAGE% /J /NJH - rem move image in place ... - del /F %USBDRIVE%\sources\install.esd 2>nul - move /Y %USBDRIVE%\sources\%IMAGE% %USBDRIVE%\sources\install.esd - - rem rename image in sources directory ... - move /Y %SOURCES%\%IMAGE% %SOURCES%\%ALTIMAGE% - ) else ( - echo. - echo INFO: NOT copying image! - echo. - echo HINT: please rename - echo [ %SOURCES%\%ALTIMAGE% ] - echo to [ %SOURCES%\%IMAGE% ] - echo for force copy of image. + rem echo. + echo DOH! no %IMAGE% in [ %SOURCES ] found + exit /b ) diff --git a/wim/finish-image.cmd b/wim/finish-image.cmd index fbfbb54..db129ff 100644 --- a/wim/finish-image.cmd +++ b/wim/finish-image.cmd @@ -1,9 +1,9 @@ @echo off -set SOURCES=c:\TEMP\W10\sources set IMAGE=c:\TEMP\IMAGE +set SOURCES=c:\TEMP\W10\sources set ESD=%SOURCES%\install.esd set WIM=%SOURCES%\install.wim -set FINAL=%SOURCES%\install_FINAL.esd +set TEMPFILE=%SOURCES%\temp.esd if NOT EXIST %WIM% ( echo. @@ -34,14 +34,17 @@ dism /Unmount-Wim /MountDir:%IMAGE% /Commit echo [%0] INFO: directory of %IMAGE% : dir %IMAGE% -echo [%0] INFO: exporting %WIM% to %FINAL% ... +echo [%0] INFO: exporting %WIM% to %TEMPFILE% ... dism /Export-Image ^ /SourceImageFile:%WIM% ^ - /DestinationImageFile:%FINAL% ^ + /DestinationImageFile:%TEMPFILE% ^ /SourceName:"Windows 10 Pro" ^ /Compress:Recovery ^ /CheckIntegrity +echo [%0] INFO: renaming new esd file to %ESD% ... +move /Y %TEMPFILE% %ESD% + rem delete wim file only in case there is an esd file ... if EXIST %ESD% ( echo [%0] INFO: deleting %WIM%