本帖最后由 chiannet 于 2018-12-23 13:44 编辑
@echo off
setlocal enabledelayedexpansion
set dism="C:\ADK\Assessment and Deployment Kit\Deployment Tools\x86\DISM\dism.exe"
if not exist %Dism% (if exist %windir%\system32\dism.exe (set dism="dism.exe") else (echo 没发现dism.exe&exit))
set XX=LTSC\X86
for %%i in (%XX%) do (if exist "%~dp0%%i\install.wim" (call :dd %%i 1))
pause&exit
:dd
TITLE 正在处理 "%~dp0%~1\install.wim"
rd "%~dp0%~1\%~2" /q /s >nul 2>nul
md "%~dp0%~1\%~2"
%dism% /mount-image /imagefile:"%~dp0%~1\install.wim" /index:%~2 /mountdir:"%~dp0%~1\%~2" /checkintegrity
if exist "%~dp0%~1\sxs" (%dism% /image:"%~dp0%~1\%~2" /enable-feature /featurename:netfx3 /all /source:"%~dp0%~1\sxs" /limitaccess /scratchdir:d:\)
if exist "%~dp0%~1\f" (
%dism% /image:"%~dp0%~1\%~2" /add-package /packagepath:"%~dp0%~1\f"
if exist "%~dp0%~1\f2" (%dism% /image:"%~dp0%~1\%~2" /add-package /packagepath:"%~dp0%~1\f2")
)
if exist "%~dp0%~1\d" (%dism% /image:"%~dp0%~1\%~2" /add-driver /driver:"%~dp0%~1\d" /recurse /forceunsigned)
%dism% /unmount-image /mountdir:"%~dp0%~1\%~2" /commit
goto :eof
打补丁、打驱动都成功。
把
set dism="C:\ADK\Assessment and Deployment Kit\Deployment Tools\x86\DISM\dism.exe"
改成
set dism="C:\ADK\Assessment and Deployment Kit\Deployment Tools\AMDX64\DISM\dism.exe"
也试过,打补丁都能成功,其它还用dism++,Nlite(Ver1.7)都试过,上面这些都没问题,都能一次成功。但是,用dism.exe或Nlite或dism++把上一步创建的wim转esd格式统统不能成功。后来还测试在线方式给32位2019 LTSC 安装20181219的累积补丁,自然能成功。
奇怪的是64位版本,同样的顺序打64位kb4483235补丁后、可以从Win压制为esd格式。且201811月的累积更新for 32位ltsc2019,用上面的流程打补丁后的Wim文件转esd亦没有问题。
总之,就是离线打20181219的累积补丁kb4483235后,wim就不能转esd,应该是kb4483235补什么问题吗?
@echo off
setlocal enabledelayedexpansion
set dism="C:\ADK\Assessment and Deployment Kit\Deployment Tools\x86\DISM\dism.exe" if not exist %Dism% (if exist %windir%\system32\dism.exe (set dism="dism.exe") else (echo 没发现dism.exe&exit))
echo %Dism%
%Dism% /export-image /sourceimagefile:"%~dp0LTSC\X86\install.wim" /sourceindex:1 /destinationimagefile:"%~dp032LTSC.esd" /Compress:recovery /CheckIntegrity
pause
exit
|