命令行大全

bcdedit

小猪老师 发表于 2020-06-18 10:58浏览次数:

bcdedit命令行工具修改引导配置数据存储,包含配置参数并控制如何引导操作系统。 这些参数以前在引导.ini文件(在基于bios的操作系统中)或非易失性RAM条目在EFI(基于可扩展固件接口的操作系统中)中。 可以使用Bcdedit.exe在引导配置数据存储中添加、删除、编辑和追加条目。

查看英文版

目录:

1 bcdedit 运行系统环境

2 bcdedit语法

bcdedit 运行系统环境

Windows vista

Windows 7

Windows 8

Windows 10

bcdedit语法

对存储进行操作的命令

/createstore

该命令创建了一个新的空引导配置数据存储。创建的存储不是系统存储。

bcdedit /createstore

指定引导配置数据存储区的文件名。
如果文件名包含空格,则必须用引号括起来""。
例子:
下面的命令创建指定的存储文件:

bcdedit /createstore C:\DATA\BCD
/export

该命令将系统存储的内容导出到一个文件中。
稍后可以使用此文件恢复系统存储的状态。
此命令仅对系统存储有效。
要用作导出目标的文件名。
如果文件名包含空格,则必须用引号括起来""。
例子:
下面的命令将系统存储导出到指定的文件:

bcdedit /export "C:\Data\BCD Backup"
/import

此命令使用以前使用/export命令生成的备份数据文件恢复系统存储的状态。在进行导入之前,系统存储中的任何现有条目都会被删除。此命令仅对系统存储有效。

bcdedit /import[/clean]

导入到系统存储区的文件的名称。
如果文件名包含空格,则必须用引号括起来""。
clean指定应该删除所有现有固件引导条目(只影响EFI系统)。
例子:
以下命令将指定的文件导入系统存储区。

bcdedit /import "C:\Data\BCD Backup" /clean
/sysstore

此命令设置系统存储设备。此命令仅在系统存储设备不明确的情况下对EFI系统有效。此设置在重新引导时不会持久存在。

bcdedit /sysstore

要设置为系统存储设备的系统分区的名称。
该设备必须是一个系统分区。
例子:
以下命令将系统存储设备设置为指定:

bcdedit /sysstore C:

对存储中的项进行操作的命令

/copy

此命令创建指定引导条目的副本。

bcdedit [/store] /copy {} /d

指定要使用的存储区。 如果未指定此选项,则使用系统存储。 有关更多信息,请运行“ bcdedit /?store”。
指定要复制的条目的标识符。 有关标识符的更多信息,请运行“ bcdedit /?ID”。
指定要应用于新条目的描述。
例:
以下命令创建指定的操作系统启动项的副本:

bcdedit /copy {cbd971bf-b7b8-4885-951a-fa03044f5d71} /d "Copy of entry"
/create

以下命令创建一个基于NTLDR的OS加载程序条目(Ntldr):

bcdedit /create {ntldr} /d "Earlier Windows OS Loader"

以下命令创建一个RAM磁盘附加选项条目:

bcdedit /create {ramdiskoptions}

以下命令创建一个新的操作系统启动项:

bcdedit /create /d "Windows Vista" /application osloader

以下命令创建一个新的调试器设置条目:

bcdedit /create {dbgsettings}
/delete

此命令从引导配置数据存储中删除条目。

bcdedit [/store] /delete[/f] [/cleanup | /nocleanup]

指定要使用的存储区。 如果未指定此选项,则使用系统存储。 有关更多信息,请运行“ bcdedit /?store”。
指定要删除的引导条目的标识符。 有关标识符的更多信息,请运行“ bcdedit /?ID”。
/ f-删除指定的条目。 如果没有此选项,bcdedit将不会删除具有众所周知标识符的任何条目。
/ cleanup-删除指定的条目并从显示顺序中删除该条目。 从该存储中删除对该条目的所有其他引用。 删除OS加载程序条目时,如果其他OS加载程序未引用关联的休眠休眠恢复,则也将删除它。 除非指定了/ nocleanup,否则假定使用此选项。
/ nocleanup-删除指定的条目,而不从显示顺序中删除该条目。
例子:
以下命令从存储中删除指定的操作系统条目,并从显示顺序中删除该条目:

bcdedit /delete {cbd971bf-b7b8-4885-951a-fa03044f5d71}

下面的命令从存储中删除指定的操作系统条目,并从显示顺序中删除该条目:

bcdedit /delete {cbd971bf-b7b8-4885-951a-fa03044f5d71} /cleanup

下面的命令从存储中删除指定的操作系统条目,而不从显示订单中删除该条目:

bcdedit /delete {cbd971bf-b7b8-4885-951a-fa03044f5d71} /nocleanup

下面的命令从存储库中删除基于NTLDR的OS加载器条目:

bcdedit /delete {ntldr} /f
/mirror

此命令创建指定引导条目的镜像。

bcdedit [/store] /mirror {}

指定要使用的存储区。
如果未指定此选项,则使用系统存储。
更多信息,运行"bcdedit /? store”。
指定要镜像的条目的标识符。
有关标识符的更多信息,请运行"bcdedit /? ID”。
例子:
下面的命令创建指定操作系统引导条目的镜像:

bcdedit /mirror {cbd971bf-b7b8-4885-951a-fa03044f5d71}

对输入选项进行操作的命令

/deletevalue

这个命令从引导配置数据存储中的条目中删除一个数据元素。

bcdedit [/store] /deletevalue []

指定要使用的存储。如果未指定此选项,则使用系统存储。有关更多信息,请运行“ bcdedit /?store”。
指定将被修改的条目的标识符。如果未指定,则使用{current}。有关标识符的更多信息,请运行“ bcdedit /?ID”。
指定将从指定条目中删除的选项。运行“ bcdedit /?TYPES”以获取有关数据类型的更多信息。
例子:
以下命令从引导管理器条目中删除引导序列选项:

bcdedit /deletevalue {bootmgr} bootsequence

以下命令从当前操作系统启动项中删除Windows Pre-installation Environment(WinPE)值:

bcdedit /deletevalue winpe

以下命令从指定的操作系统启动项中删除Windows PE值:

bcdedit /deletevalue {cbd971bf-b7b8-4885-951a-fa03044f5d71} winpe
/set

此命令在引导配置数据存储中设置条目选项值

bcdedit [/store] /set [{}][ /addfirst | /addl ast | /remove ]

指定要使用的存储。如果未指定此选项,则使用系统存储。有关更多信息,请运行“ bcdedit /?store”。

指定要修改的条目的标识符。如果未指定,则使用{current}。有关标识符的更多信息,请运行“ bcdedit /?ID”。

指定将要创建或修改的选项数据类型。运行“ bcdedit /?TYPES”以获取有关数据类型的更多信息。

指定应分配给该选项的值。<值>的格式取决于指定的数据类型。运行“ bcdedit /?FORMATS”以获取有关数据格式的更多信息。

/ addfirst-仅当数据类型是对象列表时才可以使用此开关。将指定的条目标识符添加到列表的顶部。如果指定了此开关,则只能指定一个条目标识符。如果指定的标识符已经在列表中,则将其移到列表的顶部。

/ addlast-仅当数据类型是对象列表时才可以使用此开关。将指定的条目标识符添加到列表的末尾。如果指定了此开关,则只能指定一个条目标识符。如果指定的标识符已在列表中,则将其移到列表的末尾。

/remove-仅当数据类型是对象列表时才可以使用此开关。从列表中删除指定的条目标识符。如果指定了此开关,则只能指定一个条目标识符。如果标识符不在列表中,则该操作无效。如果要删除最后一个条目,那么将删除数据类型值。

例子:

以下命令将应用程序设备设置为指定操作系统条目的分区C :

bcdedit /set {cbd971bf-b7b8-4885-951a-fa03044f5d71} device partition=C:

注意:使用“ hd_partiton =”语法可显式禁用自动VHD检测,并创建与引导虚拟机兼容的条目,例如:

bcdedit /store F:\boot\bcd /set {default} device hd_partition=F:

以下命令将OS设备设置为指定操作系统条目的VHD文件(C:\ vdisks \ vdisk01.vhd):

bcdedit /set {cbd971bf-b7b8-4885-951a-fa03044f5d71} osdevice vhd=[C:]\vdisks\disk01.vhd

以下命令将指定操作系统条目的应用程序路径设置为\ windows \ system32 \ winload.exe:

bcdedit /set {cbd971bf-b7b8-4885-951a-fa03044f5d71} path \windows\system32\winload.exe

以下命令将当前操作系统引导项的NX策略设置为OptIn。

bcdedit /set nx optin

控制输出的命令

/enum

此命令列出存储中的条目。/enum命令是默认命令,因此运行不带参数的“ bcdedit”等效于运行“ bcdedit / enum ACTIVE”。

bcdedit [/store] /enum [|] [/v]

指定要使用的存储。如果未指定此选项,则使用系统存储。有关更多信息,请运行“ bcdedit /?store”。

指定要列出的条目的类型。可以是以下之一:

ACTIVE -引导管理器中的所有条目默认显示顺序。

FIRMWARE -所有固件应用程序。

BOOTAPP-所有引导环境应用程序。

BOOTMGR-引导管理器。

OSLOADER-所有操作系统条目。

RESUME -所有从休眠条目恢复。

INHERIT -所有继承条目。

ALL-全部输入。

指定要列出的条目的标识符。如果提供了标识符,则仅列出指定的对象。有关标识符的信息,请运行“ bcdedit /?ID”。

/v显示完整的条目标识符,而不是使用名称作为知名标识符。

例子:

以下命令列出了所有操作系统加载程序引导项:

bcdedit /enum OSLOADER

以下命令列出了所有引导管理器条目:

bcdedit /enum BOOTMGR

以下命令仅列出默认的引导项:

bcdedit /enum {default}

以下命令仅列出指定的操作系统引导项:

bcdedit /enum {b38a9fc1-5690-11da-b795-e9ad3c5e0e3a}
/v

命令行选项,它完整显示条目标识符,而不是使用名称作为知名标识符。

单独使用/v作为命令,以完整显示ACTIVE类型的条目标识符。

通常,任何众所周知的条目标识符都将用其友好的速记形式代替。将/v指定为命令行开关可防止此替换,并完整显示所有标识符。单独运行“ bcdedit /v”等效于运行“ bcdedit / enum ACTIVE /v”。

bcdedit /v

例:

以下命令列出了系统存储中的活动条目,并完整显示了所有条目标识符。

bcdedit /enum ACTIVE /v

控制引导管理器的命令

/bootsequence

这个命令设置引导管理器使用的一次性引导序列。

bcdedit /bootsequence[...] [ /addfirst | /addlast | /remove ]

<[...]指定组成引导序列的标识符列表。您必须至少指定一个标识符,并且必须用空格分隔标识符。有关标识符的更多信息,请运行“ bcdedit /?ID”。
/ addfirst-将指定的条目标识符添加到引导序列的顶部。如果指定了此开关,则只能指定一个标识符。如果标识符已经在列表中,则将其移到列表顶部。
/ addlast-将指定的条目标识符添加到引导序列的末尾。如果指定了此开关,则只能指定一个标识符。如果标识符已经在列表中,则将其移到列表末尾。
/ remove-从启动顺序中删除指定的条目标识符。如果指定了此开关,则只能指定一个条目标识符。如果标识符不在列表中,则该操作无效。如果要删除最后一个条目,则会从启动管理器条目中删除启动顺序值。
例子:
以下命令在引导管理器一次性引导序列中设置两个OS条目和基于NTLDR的OS加载程序:

bcdedit /bootsequence {802d5e32-0784-11da-bd33-000476eba25f} {cbd971bf-b7b8-4885-951a-fa03044f5d71} {ntldr}

以下命令将指定的OS条目添加到引导管理器一次性引导序列的末尾:

bcdedit /bootsequence {802d5e32-0784-11da-bd33-000476eba25f} /addlast
/default

此命令设置在超时到期时引导管理器将使用的默认条目。

bcdedit /default

指定在超时值到期时作为默认值使用的引导条目的标识符。
有关标识符的信息,运行"bcdedit /? ID”。
例子:
下面的命令将指定的条目设置为默认的引导管理器条目:

bcdedit /default {cbd971bf-b7b8-4885-951a-fa03044f5d71}

下面的命令将基于NTLDR的OS加载程序设置为默认项:

bcdedit /default {ntldr}
/displayorder

此命令设置引导管理器使用的显示顺序。

bcdedit /displayorder[...] [ /addfirst | /addlast | /remove ]

[...]指定组成显示顺序的标识符列表。必须至少指定一个标识符,并且必须用空格分隔。有关标识符的更多信息,请运行“ bcdedit /?ID”。
/ addfirst-将指定的条目标识符添加到显示顺序的顶部。如果指定了此开关,则只能指定一个条目标识符。如果指定的标识符已经在列表中,则将其移到列表的顶部。
/ addlast-将指定的条目标识符添加到显示顺序的末尾。如果指定了此开关,则只能指定一个条目标识符。如果指定的标识符已在列表中,则将其移到列表的末尾。
/ remove-从显示顺序中删除指定的条目标识符。如果指定了此开关,则只能指定一个条目标识符。如果标识符不在列表中,则该操作无效。如果要删除最后一个条目,那么将从引导管理器条目中删除显示顺序值。
例子:
以下命令在引导管理器显示顺序中设置两个OS条目和基于NTLDR的OS加载程序:

bcdedit /displayorder {802d5e32-0784-11da-bd33-000476eba25f} {cbd971bf-b7b8-4885-951a-fa03044f5d71} {ntldr}

下面的命令将指定的OS条目添加到引导管理器显示顺序的末尾:

bcdedit /displayorder {802d5e32-0784-11da-bd33-000476eba25f} /addlast
/timeout

该命令设置引导管理器选择默认条目之前的等待时间(以秒为单位)。有关设置默认条目的信息,请运行"bcdedit /? default”。

bcdedit /timeout

指定引导管理器选择默认条目之前等待的时间(以秒为单位)。
例:
以下命令将引导管理器设置为30秒:

bcdedit /timeout 30
/toolsdisplayorder

该命令将设置引导管理器在显示tools菜单时使用的显示顺序。

bcdedit /toolsdisplayorder[...] [ /addfirst | /addlast | /remove ]

[...]指定组成工具显示顺序的标识符列表。必须至少指定一个标识符,并且必须用空格分隔。有关标识符的更多信息,请运行“ bcdedit /?ID”。
/ addfirst-将指定的条目标识符添加到工具显示顺序的顶部。如果指定了此开关,则只能指定一个条目标识符。如果指定的标识符已经在列表中,则将其移到列表的顶部。
/ addlast-将指定的条目标识符添加到工具显示顺序的末尾。如果指定了此开关,则只能指定一个条目标识符。如果指定的标识符已在列表中,则将其移到列表的末尾。
/ remove-从工具显示顺序中删除指定的条目标识符。如果指定了此开关,则只能指定一个条目标识符。如果标识符不在列表中,则该操作无效。如果要删除最后一个条目,那么将从引导管理器条目中删除工具显示顺序值。
例子:
以下命令在引导管理器的工具显示顺序中设置两个工具条目和内存诊断:

bcdedit /toolsdisplayorder {802d5e32-0784-11da-bd33-000476eba25f} {cbd971bf-b7b8-4885-951a-fa03044f5d71} {memdiag}

以下命令将指定的工具条目添加到引导管理器的工具显示顺序的末尾:

bcdedit /toolsdisplayorder {802d5e32-0784-11da-bd33-000476eba25f} /addlast

Commands that operate on a store

/createstore

This command created a new empty boot configuration data store. The created store is not a system store.

bcdedit /createstore

specifies the file name of the boot configuration data store. If the file name contains spaces, it must be enclosed in quotation marks ("").

Example:

The following command creates the specified store file:

bcdedit /createstore C:\DATA\BCD
/export

This command exports the contents of the system store into a file. This file can be used later to restore the state of the system store. This command is only valid for the system store.

is the file name to be used as the destination for the export. If the file name contains spaces, it must be enclosed in quotation marks ("").

Example:

The following command exports the system store to the specified file:

bcdedit /export "C:\Data\BCD Backup"
/import

This command restores the state of the system store using a backup data file previously generated using the /export command. Any existing entries in the system store are deleted before the import takes place. This command is only valid for the system store.

bcdedit /import[/clean]

the name of the file that is imported into the system store.

If the file name contains spaces, it must be enclosed in quotation marks ("").

/clean specifies that all existing firmware boot entries should be deleted (only affects EFI systems).

Example:

The following command imports the specified file into the system store.

bcdedit /import "C:\Data\BCD Backup" /clean
/sysstore

This command sets the system store device. This command is only valid for EFI systems in cases where the system store device is ambiguous. This setting does not persist across reboots.

bcdedit /sysstore

the name of a system partition to set as the system store device. The device must be a system partition.

Example:

The following command sets the system store device as specified:

bcdedit /sysstore C:

Commands that operate on entries in a store

/copy

This command creates a copy of the specified boot entry.

bcdedit [/store] /copy {} /d

specifies the store to be used. If this option is not specified, the system store is used. For more information, run "bcdedit /? store".

specifies the identifier of the entry to be copied. For more information about identifiers, run"bcdedit /? ID".

specifies the description to be applied to the new entry.

Example:

The following command creates a copy of the specified operating system boot entry:

bcdedit /copy {cbd971bf-b7b8-4885-951a-fa03044f5d71} /d "Copy of entry"
/create

The following command creates an NTLDR based OS loader entry (Ntldr):

bcdedit /create {ntldr} /d "Earlier Windows OS Loader"

The following command creates a RAM disk additional options entry:

bcdedit /create {ramdiskoptions}

The following command creates a new operating system boot entry:

bcdedit /create /d "Windows Vista" /application osloader

The following command creates a new debugger settings entry:

bcdedit /create {dbgsettings}
/delete

This command deletes an entry from the boot configuration data store.

bcdedit [/store] /delete[/f] [/cleanup | /nocleanup]

specifies the store to be used. If this option is not specified, the system store is used. For more information, run "bcdedit /? store".

specifies the identifier of the boot entry that you want to delete. For more information about identifiers, run "bcdedit /? ID".

/f - Deletes the specified entry. Without this option, bcdedit will not delete any entries that have a well-known identifier.

/cleanup - Deletes the specified entry and removes the entry from the display order. Any other references to the entry being deleted are removed from the store. When deleting an OS loader entry, the associated resume from hibernation entry is also deleted if it is not referenced by any other OS loaders. This option is assumed unless /nocleanup is specified.

/nocleanup - Deletes the specified entry without removing the entry from the display order.

Examples:

The following command deletes the specified operating system entry from the store and removes the entry from the display order:

bcdedit /delete {cbd971bf-b7b8-4885-951a-fa03044f5d71}

The following command deletes the specified operating system entry from the store and removes the entry from the display order:

bcdedit /delete {cbd971bf-b7b8-4885-951a-fa03044f5d71} /cleanup

The following command deletes the specified operating system entry from the store without removing the entry from the display order:

bcdedit /delete {cbd971bf-b7b8-4885-951a-fa03044f5d71} /nocleanup

The following command deletes the NTLDR based OS loader entry from the store:

bcdedit /delete {ntldr} /f
/mirror

This command creates a mirror of the specified boot entry.

bcdedit [/store] /mirror {}

specifies the store to be used. If this option is not specified, the system store is used. For more information, run "bcdedit /? store".

specifies the identifier of the entry to be mirrored. For more information about identifiers, run "bcdedit /? ID".

Example:

The following command creates a mirror of the specified operating system boot entry:

bcdedit /mirror {cbd971bf-b7b8-4885-951a-fa03044f5d71}

Commands that operate on entry options

/deletevalue

This command deletes a data element from an entry in the boot configuration data store.

bcdedit [/store] /deletevalue []

specifies the store to be used. If this option is not specified, the system store is used. For more information, run "bcdedit /? store".

specifies the identifier of the entry that will be modified. If not specified, {current} is used. For more information about identifiers, run "bcdedit /? ID".

specifies the option that will be removed from the specified entry. Run "bcdedit /? TYPES" for more information about data types.

Examples:

The following command deletes the bootsequence option from the boot manager entry:

bcdedit /deletevalue {bootmgr} bootsequence

The following command deletes the Windows Pre-installation Environment (WinPE) value from the current operating system boot entry:

bcdedit /deletevalue winpe

The following command deletes the Windows PE value from the specified operating system boot entry:

bcdedit /deletevalue {cbd971bf-b7b8-4885-951a-fa03044f5d71} winpe
/set

This command sets an entry option value in the boot configuration data store.

bcdedit [/store] /set [{}][ /addfirst | /addl ast | /remove ]

specifies the store to be used. If this option is not specified, the system store is used. For more information, run "bcdedit /? store".

specifies the identifier of the entry to be modified. If not specified, {current} is used. For more information about identifiers, run "bcdedit /? ID".

specifies the option data type that will be created or modified. Run "bcdedit /? TYPES" for more information about data types.

specifies the value that should be assigned to the option. The format ofdepends on the data type specified. Run "bcdedit /? FORMATS" for more information about data formats.

/addfirst - This switch can only be used if datatype is an object list. Adds the specified entry identifier to the top of the list. If this switch is specified, only a single entry identifier may be specified. If the specified identifier is already in the list, it is moved to the top of the list.

/addlast - This switch can only be used if datatype is an object list. Adds the specified entry identifier to the end of the list. If this switch is specified, only a single entry identifier may be specified. If the specified identifier is already in the list, it is moved to the end of the list.

/remove - This switch can only be used if datatype is an object list. Removes the specified entry identifier from the list. If this switch is specified, only a single entry identifier may be specified. If the identifier is not in the list, then the operation has no effect. If the last entry is being removed, then the datatype value is deleted.

Examples:

The following command sets the application device to the partition C: for the specified operating system entry:

bcdedit /set {cbd971bf-b7b8-4885-951a-fa03044f5d71} device partition=C:

NOTE: Use 'hd_partiton=' syntax to explicitly disable automatic VHD detection, and create entries that are compatible for booting a virtual machine, for example:

bcdedit /store F:\boot\bcd /set {default} device hd_partition=F:

The following command sets the OS device to a VHD file (C:\vdisks\vdisk01.vhd) for the specified operating system entry:

bcdedit /set {cbd971bf-b7b8-4885-951a-fa03044f5d71} osdevice vhd=[C:]\vdisks\disk01.vhd

The following command sets the application path to \windows\system32\winload.exe for the specified operating system entry:

bcdedit /set {cbd971bf-b7b8-4885-951a-fa03044f5d71} path \windows\system32\winload.exe

The following command sets the NX policy to OptIn for the current operating system boot entry.

bcdedit /set nx optin

Commands that control output

/enum

This command lists entries in a store. The /enum command is the default, so running "bcdedit" without parameters is equivalent to running "bcdedit /enum ACTIVE".

bcdedit [/store] /enum [|] [/v]

specifies the store to be used. If this option is not specified, the system store is used. For more information, run "bcdedit /? store".

specifies the type of entries to be listed.can be one of the following:

ACTIVE - All entries in the boot manager display order by default.

FIRMWARE - All firmware applications.

BOOTAPP - All boot environment applications.

BOOTMGR - The boot manager.

OSLOADER - All operating system entries.

RESUME - All resume from hibernation entries.

INHERIT - All inherit entries.

ALL - Do all entries.

specifies the identifier of the entry to be listed. If an identifier is provided, then only the specified object will be listed. For information about identifiers, run "bcdedit /? ID".

/v Displays entry identifiers in full, rather than using names for well-known identifiers.

Examples:

The following command lists all operating system loader boot entries:

bcdedit /enum OSLOADER

The following command lists all boot manager entries:

bcdedit /enum BOOTMGR

The following command lists only the default boot entry:

bcdedit /enum {default}

The following command lists only the specified operating system boot entry:

bcdedit /enum {b38a9fc1-5690-11da-b795-e9ad3c5e0e3a}
/v

Command line option that displays entry identifiers in full, rather than using names for well-known identifiers.

Use /v by itself as a command to display entry identifiers in full for the ACTIVE type.

Usually, any well-known entry identifiers are replaced by their friendly shorthand form. Specifying /v as a command line switch prevents this replacement and displays all identifiers in full. Running "bcdedit /v" by itself is equivalent to running "bcdedit /enum ACTIVE /v".

bcdedit /v

Example:

The following command lists the active entries in the system store with all entry identifiers displayed in full.

bcdedit /enum ACTIVE /v

Commands that control the boot manager

/bootsequence

This command sets the one-time boot sequence to be used by the boot manager.

bcdedit /bootsequence[...] [ /addfirst | /addlast | /remove ]

[...] specifies a list of identifiers that make up the boot sequence. You must specify at least one identifier and must separate identifiers by spaces. For more information about identifiers, run "bcdedit /? ID".

/addfirst - Adds the specified entry identifier to the top of the boot sequence. If this switch is specified, only a single identifier may be specified. If the identifier is already in the list, it is moved to the top of the list.

/addlast - Adds the specified entry identifier to the end of the boot sequence. If this switch is specified, only a single identifier may be specified. If the identifier is already in the list, it is moved to the end of the list.

/remove - Removes the specified entry identifier from the boot sequence. If this switch is specified, only a single entry identifier may be specified. If the identifier is not in the list, then the operation has no effect. If the last entry is being removed, then the boot sequence value is deleted from the boot manager entry.

Examples:

The following command sets two OS entries and the NTLDR based OS loader in the boot manager one-time boot sequence:

bcdedit /bootsequence {802d5e32-0784-11da-bd33-000476eba25f} {cbd971bf-b7b8-4885-951a-fa03044f5d71} {ntldr}

The following command adds the specified OS entry to the end of the boot manager one-time boot sequence:

bcdedit /bootsequence {802d5e32-0784-11da-bd33-000476eba25f} /addlast
/default

This command sets the default entry that the boot manager will use when the timeout expires.

bcdedit /default

specifies the identifier of the boot entry to be used as the default when the time-out expires. For information about identifiers, run "bcdedit /? ID".

Examples:

The following command sets the specified entry as the default boot manager entry:

bcdedit /default {cbd971bf-b7b8-4885-951a-fa03044f5d71}

The following command sets the NTLDR based OS loader as the default entry:

bcdedit /default {ntldr}
/displayorder

This command sets the display order to be used by the boot manager.

bcdedit /displayorder[...] [ /addfirst | /addlast | /remove ]

[...] specifies a list of identifiers that make up the display order. At least one identifier must be specified and they must be separated by spaces. For more information about identifiers, run "bcdedit /? ID".

/addfirst - Adds the specified entry identifier to the top of the display order. If this switch is specified, only a single entry identifier may be specified. If the specified identifier is already in the list, it is moved to the top of the list.

/addlast - Adds the specified entry identifier to the end of the display order. If this switch is specified, only a single entry identifier may be specified. If the specified identifier is already in the list, it is moved to the end of the list.

/remove - Removes the specified entry identifier from the display order. If this switch is specified, only a single entry identifier may be specified. If the identifier is not in the list, then the operation has no effect. If the last entry is being removed, then the display order value is deleted from the boot manager entry.

Examples:

The following command sets two OS entries and the NTLDR based OS loader in the boot manager display order:

bcdedit /displayorder {802d5e32-0784-11da-bd33-000476eba25f} {cbd971bf-b7b8-4885-951a-fa03044f5d71} {ntldr}

The following command adds the specified OS entry to the end of the boot manager display order:

bcdedit /displayorder {802d5e32-0784-11da-bd33-000476eba25f} /addlast
/timeout

This command sets the time to wait, in seconds, before the boot manager selects a default entry. For information about setting the default entry, run "bcdedit /? default".

bcdedit /timeout

specifies the time to wait, in seconds, before the boot manager selects a default entry.

Example:

The following command sets the boot managerto 30 seconds:

bcdedit /timeout 30
/toolsdisplayorder

This command will set the display order to be used by the boot manager when displaying the tools menu.

bcdedit /toolsdisplayorder[...] [ /addfirst | /addlast | /remove ]

[...] specifies a list of identifiers that make up the tools display order. At least one identifier must be specified and they must be separated by spaces. For more information about identifiers, run "bcdedit /? ID".

/addfirst - Adds the specified entry identifier to the top of the tools display order. If this switch is specified, only a single entry identifier may be specified. If the specified identifier is already in the list, it is moved to the top of the list.

/addlast - Adds the specified entry identifier to the end of the tools display order. If this switch is specified, only a single entry identifier may be specified. If the specified identifier is already in the list, it is moved to the end of the list.

/remove - Removes the specified entry identifier from the tools display order. If this switch is specified, only a single entry identifier may be specified. If the identifier is not in the list, then the operation has no effect. If the last entry is being removed, then the tools display order value is deleted from the boot manager entry.

Examples:

The following command sets two tools entries and the memory diagnostic in the boot manager's tools display order:

bcdedit /toolsdisplayorder {802d5e32-0784-11da-bd33-000476eba25f} {cbd971bf-b7b8-4885-951a-fa03044f5d71} {memdiag}

The following command adds the specified tool entry to the end of the boot manager's tools display order:

bcdedit /toolsdisplayorder {802d5e32-0784-11da-bd33-000476eba25f} /addlast

要使用bcdedit命令,您必须位于提升权限的命令提示符下。 单独运行“ bcdedit”等效于运行“ bcdedit / enum ACTIVE”。

To use the bcdedit command, you must be in an elevated command prompt. Running "bcdedit" by itself is equivalent to running "bcdedit /enum ACTIVE".

查看英文版

查看中文版