Windows BCDEDIT Command Tutorial

Windows operating systems store the boot-related data and configuration in the Boot Configuration Data or BCD . The provided data and configuration replace the Boot.ini configuration file. The BCDEdit command line tool is used to manage the Boot Configuration Data easily via a command-line interface with different parameters. The BCDEdit can be used to create a new store, modify the existing store, add boot parameters, etc.

BCDEdit Command Location

The BCDEdit.exe is located under the “%WINDIR%\System32” or “C:\Windows\System32” for the modern Windows operating systems. But it can be directly called via the command interface like MS-DOS or PowerShell without providing the complete path.

%WINDIR%\System32

BCDEdit Command Syntax

The BCDEdit command has the following simple syntax.

bcdedit /COMMAND ARGUMENTS
  • /COMMAND is the action we want to take.
  • ARGUMENTS are single or more arguments related to the /COMMAND.

Create New Store

By default, every system has a default boot configuration. But we can also create a new boot configuration which is called creating the store. The /createstore command is used to create a new store. The store path and file name are provided as an argument.

> bcdedit /createstore "C:\BCDDATA"

Export Store

Exporting is another action to save the current system store into a different file. The exporting can be used to a backup current system store. This command is only used for the system store and not other stores. The /export command is used to export system store bt providing the exported file path and name.

> bcdedit /export "C:\BCD_Backup"

Import Store

Exported or another store can be imported in order to make a specified store a system store. the system store is completely updated according to the imported store. The /import command is used to import specified stores.

> bcdedit /import "C:\BCD_Backup"

Copy Item

The BCDEdit command can be used to edit the BCD file by copying existing items. The /copy command is used by providing the item ID we want to copy. The /d is used to create a description of the copied entry.

> bcdedit /copy {cbd231bf-b7c8-7785-951a-fa03044f5d71} /d "New Entry"

Create Item

The /create command can be used to create a new item or entry for the default store. The entry type can be a ramdisk or OS Loader etc.

See also  How To Register DLL File In Windows?

NTLDR based OS loader entry:

> bcdedit /create {ntldr} /d "New Windows OS Loader"

Creates a RAM disk:

> bcdedit /create {ramdiskoptions}

New Operating System Boot Entry:

> bcdedit /create /d "Windows ABC" /application osloader

New Debugger Entry:

> bcdedit /create {dbgsettings}

Delete Item

An existing item can be deleted or removed with the /delete command. The item ID should be provided as an argument to the /delete command.

> bcdedit /delete {cacd71bf-b738-4885-921a-faac31f44f5d71}

Set Value

The /set command can be used to set a new value for an item.

bcdedit /set {cb2371bf-b7b8-4ac5-951a-fa81444f5d71} device partition=C:

Delete Value

A value can be deleted by using the /deletevalue command.

> bcdedit /deletevalue {c12371bf-b321-4185-9aaa-fa03acdef5d71} winpe

Set Boot (Wait) Timeout

Another important function of the bcdedit is the ability to change boot wait timeout. The /timeout command is used to change the current wait time. The default wait time is 5 seconds. In the following example, we set the wait time as 10 seconds.

> bcdedit /timeout 30

Leave a Comment