Page 1 of 1

Does not work optimize

Posted: Fri Mar 10, 2017 7:57 am
by sov44
The optimize command does not work after importing wimRE.wim to install.wim

Code: Select all

@Echo off
SetLocal EnableDelayedExpansion

set in=f:\new_Win7\12
set rw=x86

>nul "%rw%\wimlib-imagex.exe" extract "%in%\install86.wim_" "1" --dest-dir="%in%" Windows\system32\recovery\winre.wim

for /l %%a in (1,1,5) do (
  >nul "%rw%\wimlib-imagex.exe" update "%in%\install86.wim_" "%%a" --command="add '%in%\winRE.wim' '\Windows\system32\recovery\winRE.wim'"

%rw%\wimlib-imagex.exe optimize "%in%\install86.wim_" --compress=LZX:100

I experimented with the modified winre, it's just an example that optimization after import does not work.