|
小改一下,BOOT.WIM和BOOT.SDI 可以放入任意分区 任意文件夹。
id值{20200519-1646-5277-eeee-fffffffffffa} 表示该启动项添加日期是20年5月19日16点46分52.77秒。
id值绝对不会重复。
- @echo off&color 1f&echo.&echo.
- set aa=0
- if /i %SystemDrive% == x: set aa=1
- ver|find "5.">nul && set aa=1
- if "%aa%" == "1" cls&echo.&echo.&echo 不能在PE或XP中运行!&echo.&echo 按任意键退出...&pause>nul&exit
- set time1=%time%
- if "%time1:~0,1%"==" " set time1=0%time1:~1%
- set id1={%date:~0,4%%date:~5,2%%date:~8,2%-%time1:~0,2%%time1:~3,2%-%time1:~6,2%%time1:~9,2%-eeee-fffffffffffa}
- set id2={%date:~0,4%%date:~5,2%%date:~8,2%-%time1:~0,2%%time1:~3,2%-%time1:~6,2%%time1:~9,2%-eeee-fffffffffffb}
- echo.
- bcdedit /create %id2% /d "w8x32PE" /device
- bcdedit /set %id2% ramdisksdidevice partition=e:
- bcdedit /set %id2% ramdisksdipath \00e\boot.sdi
- echo.
- bcdedit /create %id1% /d "w8x32PE" /application osloader
- bcdedit /set %id1% device ramdisk=[e:]\00e\BOOT.WIM,%id2%
- bcdedit /set %id1% osdevice ramdisk=[e:]\00e\BOOT.WIM,%id2%
- bcdedit /set %id1% path \windows\system32\boot\winload.exe
- bcdedit /set %id1% description w8x32PE
- bcdedit /set %id1% locale zh-CN
- bcdedit /set %id1% inherit {bootloadersettings}
- bcdedit /set %id1% systemroot \windows
- bcdedit /set %id1% detecthal Yes
- bcdedit /set %id1% winpe Yes
- bcdedit /set %id1% ems no
- bcdedit /displayorder %id1% /addlast
- echo.
- echo 按任意键退出...
- pause >nul
复制代码
|
-
3.jpg
(89.2 KB, 下载次数: 243)
|