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, however first we will look at manually inputting commands to add a Windows 7 entry to an existing BCD store.

To create a menu entry for Windows 7 we would need to use a series of commands similar to the following -

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.