BCDEdit - The Basics

Bcdedit.exe is a command-line tool that can be used to create, modify and read entries in a BCD store. Being a command-line tool all commands can be automated with the use of batch files.

It's possible to select a BCD store by using the /store switch (e.g. bcdedit.exe /store C:\Boot\BCD). Alternatively using bcdedit without selecting a BCD store will execute all commands on the system store - the BCD store currently in use.

The example below lists the commands for adding a Windows 7 entry to an existing BCD store. Note the data in the path element is \Windows\system32\winload.exe - the Operating System boot loader used on systems with BIOS firmware.

Running this first command will return a Globally Unique IDentifier (GUID) value - e.g. {e05b4c23-618a-11df-89c6-001d925a73cf}. In all subsequent commands replace {guid} with this value -

The following demonstrates how these commands would be entered one by one at a command prompt (remember that entries with a      highlight are commands to be entered; entries with a      highlight is output from running the command).

  1. bcdedit /store C:\boot\BCD /create /application osloader [enter]
    The entry {e05b4c23-618a-11df-89c6-001d925a73cf} was successfully created.

Remember that the GUID value created when running the /create command (in this case {e05b4c23-618a-11df-89c6-001d925a73cf}) must be used in all subsequent commands used for this particular object/entry -

  1. bcdedit.exe /store C:\Boot\BCD /set {e05b4c23-618a-11df-89c6-001d925a73cf} device partition=C: [enter]
    The operation completed successfully.
  1. bcdedit.exe /store C:\Boot\BCD /set {e05b4c23-618a-11df-89c6-001d925a73cf} path \Windows\system32\winload.exe [enter]
    The operation completed successfully.
  1. bcdedit.exe /store C:\Boot\BCD /set {e05b4c23-618a-11df-89c6-001d925a73cf} osdevice partition=C: [enter]
    The operation completed successfully.
  1. bcdedit.exe /store C:\Boot\BCD /set {e05b4c23-618a-11df-89c6-001d925a73cf} systemroot \Windows [enter]
    The operation completed successfully.
  1. bcdedit.exe /store C:\Boot\BCD /set {e05b4c23-618a-11df-89c6-001d925a73cf} description "Windows 7" [enter]
    The operation completed successfully.
  1. bcdedit.exe /store C:\Boot\BCD /displayorder {e05b4c23-618a-11df-89c6-001d925a73cf} /addlast [enter]
    The operation completed successfully.

Alternatively the above steps can be automated using the batch file below.