REM 设置变量便于操作
SET ROOT_PATH=D:\SOFTWARE\WINDOWS7SP2SET BOOT_WIM=%ROOT_PATH%\boot.wim
SET INSTALL_WIM=%ROOT_PATH%\install.wimSET MOUNT_DIR=%ROOT_PATH%\SP2
SET PATCH_DIR=%ROOT_PATH%\PATCH
REM 准备工作先清理一下,避免之前失败留下的东西。
DISM /unmount-wim /mountdir:%MOUNT_DIR% /discard
DEL /q %MOUNT_DIR%\*
DEL /q %EXPAND_DIR%\*
PAUSE
REM 查看信息,目的是为了获取index
DISM /get-wiminfo /wimfile:%INSTALL_WIM%
PAUSE
REM 无效命令。删除wim中某个映像
REM DISM /delete-image /wimfile: %INSTALL_WIM%\ /index:1
REM 无效命令。改名,表示升级了
REM imagex /info %INSTALL_WIM%\ 1 “Windows 7 Ultimate SP2 X64”
REM 加载WIN7
DISM /mount-wim /wimfile:%INSTALL_WIM% /index:4 /mountdir:%MOUNT_DIR%
PAUSE
REM {
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{ SP2 包。
REM 安装补丁文件。不使用EXPAND方式,直接安装。
SET PATCH_FILE=Windows6.1-KB3020369-x64.msu
DISM /image:%MOUNT_DIR% /add-package /packagepath:%PATCH_DIR%\%PATCH_FILE%SET PATCH_FILE=Windows6.1-kb3125574-v4-x64.msu
DISM /image:%MOUNT_DIR% /add-package /packagepath:%PATCH_DIR%\%PATCH_FILE%
REM 其他补丁,没有必要安装。
PAUSE
REM }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} SP2 包。
REM {
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{ IE11REM IE11
SET PATCH_DIR_IE11=%PATCH_DIR%\IE11SET EXPAND_DIR=%ROOT_PATH%\TEMP%PATCH_DIR_IE11%\IE11-Windows6.1-x64-zh-cn.exe ?/x:%EXPAND_DIR%
REM ?提前安装这个。
DISM /image:%MOUNT_DIR% /add-package /packagepath:PATCH_DIR=%\Windows6.1-KB2670838-x64.msu
REM ?IE11
DISM /image:%MOUNT_DIR% /add-package /packagepath:%EXPAND_DIR%\IE-Win7.CAB
REM ?环境组件?
DISM /image:%MOUNT_DIR% /add-package /packagepath:%EXPAND_DIR%\IE-Hyphenation-en.MSU
REM ?语言包。提示不适用?
DISM /image:%MOUNT_DIR% /add-package /packagepath:%EXPAND_DIR%\ielangpack-zh-CN.CAB
REM ?提示出错。
REM ?DISM /image:%MOUNT_DIR% /add-package /packagepath:%EXPAND_DIR%\IE_SUPPORT_amd64_zh-CN.CAB
REM ?拼写功能。
DISM /image:%MOUNT_DIR% /add-package /packagepath:%EXPAND_DIR%\IE-Spelling-en.MSU
PAUSE
REM ?IE11的企业模式。
DISM /image:%MOUNT_DIR% /add-package /packagepath:%PATCH_DIR%\IE11-Windows6.1-KB2932269-x64.msu
REM 其他补丁,没有必要安装。
REM 使用记事本新建ei.cfg文件,依次输入:[EditionID][Channel]Retail[VL]0,复制到sources目录下
REM }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} IE11REM {
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{ USB3 INSTALL
REM USB 3。1是为7系的,5是8系开始的。两个都添加,不知道是否有问题?
SET PATCH_USB3_1=%PATCH_DIR%\Intel(R)_USB_3.0_Driver_1
SET PATCH_USB3_5=%PATCH_DIR%\Intel(R)_USB_3.0_Driver_5DISM /image:%MOUNT_DIR% /add-driver:%PATCH_USB3_1% /Recurse /ForceUnsigned
DISM /image:%MOUNT_DIR% /add-driver:%PATCH_USB3_5% /Recurse /ForceUnsigned
REM }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} USB3 INSTALLREM 完成 install.wim
CP ? /q ei.cfg sources
DISM /unmount-wim /mountdir:%MOUNT_DIR% /commit
DEL /q %EXPAND_DIR%\*.*
REM {
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{ USB3 BOOT
REM 1 PE, 2 SETUP
DISM /get-wiminfo /wimfile:%INSTALL_WIM%
REM USB 3
DISM /Mount-Wim /Wimfile:%BOOT_WIM% /index:2 /Mountdir:%MOUNT_DIR%
DISM /image:%MOUNT_DIR% /add-driver:%PATCH_USB3_1% /Recurse /ForceUnsigned
DISM /image:%MOUNT_DIR% /add-driver:%PATCH_USB3_5% /Recurse /ForceUnsigned
DISM /unmount-wim /mountdir:%MOUNT_DIR% /commit
REM }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} USB3 BOOT
PAUSE
REM 使用UltraISO将制作好的"install.wim”重新替换Windows7 SP1MSDN系统镜像中的原install.wim;
REM 将ei.cfg文件添加到系统sources目录下,重新保存为新系统镜像。