无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站投放广告、加入VIP会员,请联系 微信:wuyouceo
查看: 1297|回复: 6
打印 上一主题 下一主题

[求助] 怎样用bcdedit.exe 编辑第二个Xp03PE启动项才能正常启动

[复制链接]
跳转到指定楼层
1#
发表于 2024-9-11 10:34:50 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 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的启动项了.请教大神们要怎么样编辑才正常
2#
发表于 2024-9-11 10:47:59 | 只看该作者
学习
回复

使用道具 举报

3#
发表于 2024-9-11 11:20:12 | 只看该作者
学习一下
回复

使用道具 举报

4#
发表于 2024-9-11 12:52:14 | 只看该作者
这样试一下:
bcdedit.exe /store "%~dp0temp\iso\boot\bcd" /create {ntldr} /d "[09] BIOS Windows 03 PE"
bcdedit.exe /store "%~dp0temp\iso\boot\bcd" /set {ntldr} device boot
bcdedit.exe /store "%~dp0temp\iso\boot\bcd" /set {ntldr} path \sources\03PE\setupldr.bin
bcdedit.exe /store "%~dp0temp\iso\boot\bcd" /displayorder {ntldr} /addlast

注:
/set {ntldr} path 后面必须是一个包含路径的类似ntldr的文件
/set {ntldr} description 的作用跟 /create {ntldr} /d 中的/d参数是一样的,两者用其中之一就可以了

点评

启动文件本来就是叫03PE  详情 回复 发表于 2024-9-11 13:46
回复

使用道具 举报

5#
 楼主| 发表于 2024-9-11 13:45:03 | 只看该作者
前面搞错了[09]应该是[03]
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
回复

使用道具 举报

6#
 楼主| 发表于 2024-9-11 13:46:08 | 只看该作者
hilsonma 发表于 2024-9-11 12:52
这样试一下:
bcdedit.exe /store "%~dp0temp\iso\boot\bcd" /create {ntldr} /d "[09] BIOS Windows 03 P ...

启动文件本来就是叫03PE
回复

使用道具 举报

7#
 楼主| 发表于 2024-9-11 16:49:04 | 只看该作者
在liangnijian老大的指点下把
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
第一行改成
bcdedit.exe /store "%~dp0temp\iso\boot\bcd" /create %id% /d "[03] BIOS Windows 03 PE" /application BOOTSECTOR
就正常了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2024-11-22 20:14

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表