|
本帖最后由 2012列兵 于 2014-6-8 07:44 编辑
在楼主原版上稍修改了一下
@echo off
PUSHD %~dp0&&color 1f
If exist "%Windir%\system32\Wimserv.exe" if exist "%Windir%\system32\drivers\wimmount.sys" (
goto Start) else (goto install)
:install
echo.&&echo 本系统需要安装WIM组件
echo.&&pause
Bin\WimMount.exe
goto :eof
:Start
If not exist "%CD%\*.ISO" echo.&&echo 请拷贝需修改的PE镜像至本目录下( %CD%\ )谢谢&&echo.&&pause&&exit
CLS
Title Imagex Tools 应用程序
Echo ╭═════════════╮
Echo ║ ║
Echo ╭═┤ Imagex Tools 应用PE修改 ├═╮
Echo ║ ║ ║ ║
Echo ║ ╰═════════════╯ ║
Echo ╟─────────────────╢
Echo ║ [1] 展开ISO → 应用WIM ║
Echo ║ ║
Echo ║ [2] ISO制作 → PE镜像 ║
Echo ║ ║
Echo ║ [3] 清理退出 → EXIT ║
Echo ║ ║
Echo ║ [4] 帮助文件 → HELP ║
Echo ╰─────────────────╯
Set /P Choice= 请选择要进行的操作 (1/2/3/4/Q/H),然后按回车:
If "%Choice%"=="" Goto Start
If Not "%Choice%"=="" Set Choice=%Choice:~0,1%
If /I "%Choice%"=="1" Goto isoext
If /I "%Choice%"=="2" Goto make
If /I "%Choice%"=="3" Goto CLEAM
If /I "%Choice%"=="4" Goto help
Goto Start
:CLEAM
if exist %CD%\iso rd %CD%\iso /s /q
if exist %CD%\wim rd %CD%\wim /s /q
if exist %CD%\isoSeek.txt del %CD%\isoSeek.txt
if exist %CD%\fSeek.txt del %CD%\ifSeek.txt
exit
:isoext
CLS
echo.
dir %CD%\*.iso /b /s >%CD%\isoSeek.txt
for /f "usebackq delims=" %%i in (%CD%\isoSeek.txt) do (set iso_m=%%i)
del %CD%\isoSeek.txt
%CD%\IsoCmd.exe -eject
%CD%\IsoCmd.exe -r
%CD%\IsoCmd.exe -i
%CD%%\IsoCmd.exe -s
%CD%\IsoCmd.exe -number 1
%CD%\IsoCmd.exe -change 1 y:
%CD%\IsoCmd.exe -mount y %iso_m%
if exist %CD%\iso rd %CD%\iso /s /q
md %CD%\iso
@xcopy y: %CD%\iso /s /e /h /y
%CD%\IsoCmd.exe -eject
%CD%\IsoCmd.exe -r
dir %CD%\iso\*.wim /b /s >%CD%\fSeek.txt
for /f "usebackq delims=" %%i in (%CD%\fSeek.txt) do (set bwim=%%i)
del %CD%\fSeek.txt
if exist %CD%\wim rd %CD%\wim /s /q
md %CD%\wim
Bin\imagex.exe /apply %bwim% 1 %CD%\wim
echo %iso_m% 展开,应用完成
pause
Goto Start
:make
CLS
dir %CD%\iso\*.wim /b /s >%CD%\fSeek.txt
for /f "usebackq delims=" %%i in (%CD%\fSeek.txt) do (set bwim=%%i)
del %CD%\fSeek.txt
echo.
echo.
echo 正在生成 %bwim% 文件
Bin\imagex.exe /capture %CD%\wim %bwim% /verify /boot /check /compress maximum "WinPE"
CLS
echo.
echo.
echo 正在把 %bwim% 整理成连续文件。
Bin\contig.exe -q %bwim%
CLS
echo.
echo.
echo 准备生成 WinPE.ISO 文件
echo.
pause
Bin\oscdimg.exe -h -m -o -l"WinPE" -n -b"Bin\boot.bif" -x "%CD%\iso" "%CD%\WinPE.ISO"
echo.
echo.
echo 制作完成,WinPE.ISO 启动镜像文件。
echo.
pause
Goto Start
:help
%Windir%\NOTEPAD.EXE 使用说明.txt
cls
Goto Start |
|