无忧启动论坛

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

原创发布BCD配置数据自动生成批处理

[复制链接]
跳转到指定楼层
1#
发表于 2009-9-17 23:16:07 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
@echo off
bcdedit.exe -createstore \bcd
set BCD=bcdedit.exe -store \bcd

%BCD% /create {dbgsettings} /d "Debugger Settings"
%BCD% /set {dbgsettings} debugtype Serial
%BCD% /set {dbgsettings} baudrate 115200
%BCD% /set {dbgsettings} debugport 1

%BCD% /create {emssettings} /d "EMS Settings"
%BCD% /create {badmemory} /d "RAM Defects"
%BCD% /create {bootloadersettings} /d "Boot Loader Settings"
%BCD% /set {emssettings} bootems yes

%BCD% /create {globalsettings} /d "Global Settings"
%BCD% -set {globalsettings} inherit {dbgsettings}
%BCD% -set {globalsettings} inherit {emssettings}
%BCD% -set {globalsettings} inherit {badmemory}

@rem {memdiag}={b2721d73-1db4-4c62-bf78-c548a880142d}
%BCD% /create {memdiag} /d "Memory Diagnostic"
%BCD% -set {memdiag} device boot
%BCD% -set {memdiag} path \boot\memtest.exe
%BCD% -set {memdiag} locale en-US
%BCD% -set {memdiag} badmemoryaccess yes
%BCD% -set {memdiag} inherit {globalsettings}

set RamDisk={7619dcc8-fafe-11d9-b411-000476eba25f}
%BCD% /create %RamDisk% /d "Ramdisk Device Options" -device
%BCD% /set %RamDisk% ramdisksdidevice boot
%BCD% /set %RamDisk% ramdisksdipath \Boot.Sdi

@rem {ntldr}={466f5a88-0af2-4f76-9038-095b170dc21c}
%BCD% /create {ntldr} /d "Legacy OS Loader"
%BCD% -set {ntldr} device boot
%BCD% -set {ntldr} path \WinNT.LDR
%BCD% -set {ntldr} locale en-US

set PEID={c3150868-07ba-11de-8b1a-001d7d969be7}
%BCD% /create %PEID% /d "Vista/2008/Win7 PE" -application OSLOADER
%BCD% -set %PEID% path \Windows\system32\boot\winload.exe
%BCD% -set %PEID% device ramdisk=[boot]\WinRE.wim,%RamDisk%
%BCD% -set %PEID% osdevice ramdisk=[boot]\WinRE.wim,%RamDisk%
%BCD% -set %PEID% systemroot \Windows
%BCD% -set %PEID% nx optin
%BCD% -set %PEID% winpe yes
%BCD% -set %PEID% detecthal yes
%BCD% -set %PEID% custom:46000010 yes

set WVID={3657ebe1-d4e6-11dc-88f0-ec9c0d1f1864}
%BCD% /create %WVID% /d "Windows 7/2008/Vista" -application OSLOADER
%BCD% -set %WVID% path \Windows\system32\winload.exe
%BCD% -set %WVID% inherit {bootloadersettings}
%BCD% -set %WVID% systemroot \Windows
%BCD% -set %WVID% device boot
%BCD% -set %WVID% osdevice boot
%BCD% -set %WVID% testsigning no
%BCD% -set %WVID% locale en-US
%BCD% -set %WVID% nx optin
%BCD% -set %WVID% recoverysequence %PEID%
%BCD% -set %WVID% recoveryenabled yes

%BCD% -create {bootmgr} /d "Windows Boot Manager"
%BCD% -set {bootmgr} resume no
%BCD% -set {bootmgr} timeout 3
%BCD% -set {bootmgr} device boot
%BCD% -set {bootmgr} locale zh-CN
%BCD% -set {bootmgr} inherit {globalsettings}
%BCD% -set {bootmgr} extendedinput yes
%BCD% -set {bootmgr} toolsdisplayorder {memdiag}

%BCD% /displayorder {ntldr} /addlast
%BCD% /displayorder %PEID% /addlast
%BCD% /displayorder %WVID% /addlast

%BCD% /default %PEID%

[ 本帖最后由 cnstars 于 2009-12-13 16:04 编辑 ]

RedoBCD.rar

1005 Bytes, 下载次数: 108, 下载积分: 无忧币 -2

2#
发表于 2009-9-18 00:07:41 | 只看该作者
这两句的意思是?启动回复环境?
%BCD% -set %WVID% recoverysequence %PEID%
%BCD% -set %WVID% recoveryenabled yes
回复

使用道具 举报

3#
发表于 2009-9-18 01:49:33 | 只看该作者
建议楼主用bcdboot,基本上一条命令能搞定上面所有条目


回二楼,这两句会在F8菜单上增加进入winre恢复环境
回复

使用道具 举报

4#
发表于 2009-9-18 08:14:41 | 只看该作者
很复杂,慢慢研究下。
回复

使用道具 举报

5#
发表于 2009-9-18 08:49:41 | 只看该作者
下载收藏备用。。。。。
回复

使用道具 举报

6#
发表于 2009-9-18 11:25:45 | 只看该作者
bcdboot是不是系统自带的命令??
回复

使用道具 举报

7#
发表于 2009-9-18 13:45:40 | 只看该作者
收藏备用,谢谢
回复

使用道具 举报

8#
发表于 2009-9-18 14:13:28 | 只看该作者
感谢楼主分享 学习中
回复

使用道具 举报

9#
发表于 2009-9-18 14:41:13 | 只看该作者
原帖由 fujianabc 于 2009-9-18 01:49 发表
建议楼主用bcdboot,基本上一条命令能搞定上面所有条目


回二楼,这两句会在F8菜单上增加进入winre恢复环境



对于PE,BCDBOOT有句需要改:

bcdedit.exe -set {c3150868-07ba-11de-8b1a-001d7d969be7} path \windows\system32\boot\winload.exe


还需增加

  bcdedit.exe -set {c3150868-07ba-11de-8b1a-001d7d969be7} winpe yes



以上仅为举例。
回复

使用道具 举报

10#
发表于 2009-9-18 14:56:07 | 只看该作者
原帖由 kinglion 于 2009-9-18 14:41 发表



对于PE,BCDBOOT有句需要改:

bcdedit.exe -set {c3150868-07ba-11de-8b1a-001d7d969be7} path \windows\system32\boot\winload.exe


还需增加

  bcdedit.exe -set {c3150868-07ba-11de-8b1a ...

第一句没必要啊,winpe也是从windows\system32\winload.exe加载的

第二句没错,是必须的。
回复

使用道具 举报

11#
发表于 2009-9-18 14:58:08 | 只看该作者
原帖由 fujianabc 于 2009-9-18 14:56 发表

第一句没必要啊,winpe也是从windows\system32\winload.exe加载的

第二句没错,是必须的。



是的,你说的没错。
回复

使用道具 举报

12#
发表于 2010-3-16 11:24:28 | 只看该作者
很不错,收下了,谢谢你的分享。
回复

使用道具 举报

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

本版积分规则

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

闽公网安备 35020302032614号

GMT+8, 2025-3-4 20:06

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

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