|
本帖最后由 owl0001 于 2024-9-11 16:50 编辑
我用这种方式编辑时
bcdedit.exe /store "%~dp0temp\iso\boot\bcd" /create {ntldr} /d "[02] BIOS Windows XP PE"
bcdedit.exe /store "%~dp0temp\iso\boot\bcd" /set {ntldr} device boot
bcdedit.exe /store "%~dp0temp\iso\boot\bcd" /set {ntldr} description "[02] BIOS Windows XP PE"
bcdedit.exe /store "%~dp0temp\iso\boot\bcd" /set {ntldr} path \WXPE\SETUPLDR.BIN
bcdedit.exe /store "%~dp0temp\iso\boot\bcd" /displayorder {ntldr} /addlast
set var=0123456789abcdef
set id=&for /l %%i in (1,1,32) do (set /a n=!random!%%16&for %%j in (!n!) do set id=!id!!var:~%%j,1!)
set id=!id:~0,8!-!id:~8,4!-!id:~12,4!-!id:~16,4!-!id:~20,12!
set id={%id%}
bcdedit.exe /store "%~dp0temp\iso\boot\bcd" /create %id% /d "[03] BIOS Windows 03 PE" /application osloader
bcdedit.exe /store "%~dp0temp\iso\boot\bcd" /set %id% device boot
bcdedit.exe /store "%~dp0temp\iso\boot\bcd" /set %id% description "[03] BIOS Windows 03 PE"
bcdedit.exe /store "%~dp0temp\iso\boot\bcd" /set %id% path \sources\03PE
bcdedit.exe /store "%~dp0temp\iso\boot\bcd" /displayorder %id% /addlast
这样编辑时03PE在boot\bcd中有启动项 但是启动时会报错
当我把03PE里的%id%换成{ntldr}如下
bcdedit.exe /store "%~dp0temp\iso\boot\bcd" /create {ntldr} /d "[03] BIOS Windows 03 PE"
bcdedit.exe /store "%~dp0temp\iso\boot\bcd" /set {ntldr} device boot
bcdedit.exe /store "%~dp0temp\iso\boot\bcd" /set {ntldr} description "[03] BIOS Windows 03 PE"
bcdedit.exe /store "%~dp0temp\iso\boot\bcd" /set {ntldr} path \sources\03PE
bcdedit.exe /store "%~dp0temp\iso\boot\bcd" /displayorder {ntldr} /addlast
这样时bcd中没有03PE的启动项了.请教大神们要怎么样编辑才正常 |
|