|
- @Echo Off
- COLOR 02
- cls
- color 0A
- Set Prog=WinPE优盘启动制作工具
- Set L1= ╭─────────────╮
- Set L2= ╭────┤ WinPE优盘启动制作工具 ├────╮
- Set L3= │ ╰─────────────╯ │
- Set L4= │==============================================│
- Set L5= │ 原理: 1.设置为可启动型U盘 2.添加启动文件 │
- Set L6= ╰───────────────────────╯
- :EXISTUSB
- CLS
- Title %Prog%——选择
- Echo.
- Echo %L1%
- Echo %L2%
- Echo %L3%
- Echo │ 确定你的优盘已经插入到您机器中,您要制作吗? │
- Echo %L4%
- Echo %L5%
- Echo %L4%
- Echo │ [1] Bootsect:设置为可启动型优盘 │
- Echo │ [Q] 退出安装 │
- Echo %L6%
- Echo.
- Set Choice=
- Set /P Choice= 请选择要进行的操作 (1/Q) ,然后按回车:
- If %Choice%Choice==Choice Goto :EXISTUSB
- If Not '%Choice%'=='' SET Choice=%Choice:~0,1%
- If /I '%Choice%'=='1' GOTO :Start
- If /I '%Choice%'=='Q' EXIT
- Goto :EXISTUSB
- :Start
- CLS
- Title %Prog%——制作
- Echo.
- Echo %L1%
- Echo %L2%
- Echo %L3%
- Echo %L4%
- Echo %L5%
- Echo %L6%
- Echo.
- Set Choice=
- Set /P Choice= 请输入你的优盘盘符(如j),然后按回车:
- If %Choice%Choice==Choice Goto Start
- If Not '%Choice%'=='' SET Choice=%Choice:~0,1%
- echo.
- Echo 正在设置为可启动型优盘优盘...
- bootsect /nt52 %choice%: >nul 2>nul
- echo 完成
- Echo 添加启动文件至U盘...
- XCOPY /H /C /Y %systemdrive%\ntldr %choice%: >nul 2>nul
- XCOPY /H /C /Y %systemdrive%\NTDETECT.COM %choice%: >nul 2>nul
- XCOPY /H /C /Y %systemdrive%\IO.SYS %choice%: >nul 2>nul
- XCOPY /H /C /Y %systemdrive%\CONFIG.SYS %choice%: >nul 2>nul
- XCOPY /H /C /Y %systemdrive%\bootfont.bin %choice%: >nul 2>nul
- XCOPY /H /C /Y %systemdrive%\MSDOS.SYS %choice%: >nul 2>nul
- echo 完成
- attrib %choice%:\BOOT.INI -s -h -r >nul 2>nul
- if exist %choice%:\BOOT.INI goto ok
- ECHO [SetupData] >%choice%:\BOOT.INI
- ECHO BootDevice="ramdisk(0)" >>%choice%:\BOOT.INI
- ECHO BootPath="\WXPE\SYSTEM32" >>%choice%:\BOOT.INI
- ECHO OsLoadOptions="/minint /fastdetect /rdexportascd /rdpath=WinPE.IS_" >>%choice%:\BOOT.INI
- :OK
- attrib %choice%:\BOOT.INI +s +h >nul 2>nul
- echo.
- Echo 启动型U盘制作完成,按任意键退出......
- ECHO.
- pause>nul 2>nul
- exit
复制代码 |
|