BCDEdit Command-Line Options

Boot Configuration Data (BCD) files provide a store that is used to describe boot applications and boot application settings. The objects and elements in the store effectively replace Boot.ini.

BCDEdit is a command-line tool for managing BCD stores. It can be used for a variety of purposes, including creating new stores, modifying existing stores, adding boot menu options, and so on. BCDEdit serves essentially the same purpose as Bootcfg.exe on earlier versions of Windows, but with two major improvements:

  • BCDEdit exposes a wider range of boot options than Bootcfg.exe.
  • BCDEdit has improved scripting support.
noteNote
Administrative privileges are required to use BCDEdit to modify BCD.

BCDEdit is the primary tool for editing the boot configuration of Windows Vista and later versions of Windows. It is included with the Windows Vista distribution in the %WINDIR%\System32 folder.

BCDEdit is limited to the standard data types and is designed primarily to perform single common changes to BCD. For more complex operations or nonstandard data types, consider using the BCD Windows Management Instrumentation (WMI) application programming interface (API) to create more powerful and flexible custom tools.

BCDEdit Command-Line Options

The following command-line options are available for BCDEdit.exe.

BCDEdit/Command [Argument1] [Argument2] ...

General BCDEdit Command-Line Option

 

Option Description

/?

Displays a list of BCDEdit commands. Running this command without an argument displays a summary of the available commands. To display detailed help for a particular command, run bcdedit /? command, where command is the name of the command you are searching for more information about. For example, bcdedit /? createstore displays detailed help for the Createstore command.

BCDEdit Command-Line Options that Operate on a Store

 

Option Description

/createstore

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

/export

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 valid only for the system store.

/import

Restores the state of the system store by using a backup data file previously generated by using the /export option. This command deletes any existing entries in the system store before the import takes place. This command is valid only for the system store.

/store

This option can be used with most BCDedit commands to specify the store to be used. If this option is not specified, then BCDEdit operates on the system store. Running the bcdedit /store command by itself is equivalent to running the bcdedit /enum active command.

BCDEdit Command-Line Options that Operate on Entries in a Store

 

Option Description

/copy

Makes a copy of a specified boot entry in the same system store.

/create

Creates a new entry in the boot configuration data store. If a well-known identifier is specified, then the /application, /inherit, and /device options cannot be specified. If an identifier is not specified or not well known, an /application, /inherit, or /device option must be specified.

/delete

Deletes an element from a specified entry.

BCDEdit Command-Line Options that Operate on Entry Options

 

Option Description

/deletevalue

Deletes a specified element from a boot entry.

/set

Sets an entry option value.

BCDEdit Command-Line Options that Control Output

 

Option Description

/enum

Lists entries in a store. The /enum option is the default value for BCEdit, so running the bcdedit command without options is equivalent to running the bcdedit /enum active command.

/v

Verbose mode. Usually, any well-known entry identifiers are represented by their friendly shorthand form. Specifying /v as a command-line option displays all identifiers in full. Running the bcdedit /v command by itself is equivalent to running the bcdedit /enum active /v command.

BCDEdit Command-Line Options that Control the Boot Manager

 

Option Description

/bootsequence

Specifies a one-time display order to be used for the next boot. This command is similar to the /displayorder option, except that it is used only the next time the computer starts. Afterwards, the computer reverts to the original display order.

/default

Specifies the default entry that the boot manager selects when the timeout expires.

/displayorder

Specifies the display order that the boot manager uses when displaying boot options to a user.

/timeout

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

/toolsdisplayorder

Specifies the display order for the boot manager to use when displaying the Tools menu.

BCDEdit Command-Line Options that Control Emergency Management Services

 

Option Description

/bootems

Enables or disables Emergency Management Services (EMS) for the specified entry.

/ems

Enables or disables EMS for the specified operating system boot entry.

/emssettings

Sets the global EMS settings for the computer. /emssettings does not enable or disable EMS for any particular boot entry.

BCDEdit Command-Line Options that Control Debugging

 

Option Description

/bootdebug

Enables or disables the boot debugger for a specified boot entry. Although this command works for any boot entry, it is effective only for boot applications.

/dbgsettings

Specifies or displays the global debugger settings for the system. This command does not enable or disable the kernel debugger; use the /debug option for that purpose. To set an individual global debugger setting, use the bcdedit /setdbgsettings type value command.

/debug

Enables or disables the kernel debugger for a specified boot entry.

To troubleshoot a new installation, enable debug mode by modifying the boot configuration file (BCD). For example, use the following syntax to enable kernel or boot debug.

bcdedit /set <id> debug on

-or-

bcdedit /set <id> bootdebug on 

where <id> is the GUID of the Loader object that is used to load the operating system. "Default" can be used if the operating system is the default option of the Boot Manager menu.

For examples of BCDEdit, see the Windows Hardware Developer Center Web site.

Tags :


Community Content

BryanLockwood
reference for bcdedit /set options
<mtps:InstrumentedLink NavigateUrl="http://msdn.microsoft.com/en-us/library/windows/hardware/ff542202(v=vs.85).aspx" runat="server" xmlns:mtps="http://msdn2.microsoft.com/mtps">http://msdn.microsoft.com/en-us/library/windows/hardware/ff542202(v=vs.85).aspx</mtps:InstrumentedLink>

ElmueSoft
Winload.exe is missing or corrupt - Recover DVD does not boot - Problem SOLVED!
How to use BCDEDIT in case of emergency:<br /><br /><br />After a power failure the Master Boot Record (MBR) got destroyed on my harddisk.<br />My entire harddisk appeared to be an unpartitioned area.<br />All partitions were gone!<br /><br />***** Shock! *****<br /><br />***** Panic! *****<br /><br />As software developer I have a multi-boot system with several operating systems and a huge data partition.<br />I was not willing to install all this anew.<br /><br /><br />1.)<br />So I searched for a tool that may recover the MBR.<br />And I found "EaseUs Partition Recovery".<br />http://www.softpedia.com/get/System/Back-Up-and-Recovery/EASEUS-Partition-Recovery.shtml<br /><br />I put the corrupted disk into another computer.<br />This program scanned my disk and found all partitions within one minute.<br />It allowed me to enable the partitions and I saw that all data was still there.<br /><br />And the best of all: This program did that great work for free!<br /><br /><br />2.)<br />After reinstalling the Boot Manager I noticed that the Windows XP partitions were still running fine while Windows Vista did not boot any more with a blackscreen:<br /><br />########################################################################################<br /><br />Windows failed to start. A recent hardware or software change might be the cause.<br />File: \Windows\System32\winload.exe<br />Status: 0xc000000e<br />Info: The selected entry could not be loaded because the application is missing or corrupt.<br /><br />########################################################################################<br /><br />This error message is (as I'am sure now) a complete nonsense.<br />As usual in Microsoft products the error messages are wrong or at least misleading.<br />The file Winload.exe is neither missing nor corrupt!<br /><br />People report in serveral blogs to get the same error after resizing the Windows partition with any third party tools that are not certified for Vista like old versions of Partition Magic, Acronis or Linux tools.<br /><br />3.)<br />I read that many people in this case successfully booted with the Windows Vista DVD and went to the "Repair" option to repair Windows Vista.<br />But in my case this did not work.<br />This stupid DVD did not boot.<br />In the middle of the boot process it was hanging without any error message.<br />No chance at all.<br />It's from Microsoft, so we cannot expect too much.<br /><br /><br />Other people used<br />Bootrec /RebuildBCD<br />or<br />Bootrec /FixBoot<br />or<br />BcdEdit /xyz...<br /><br />from the rescue console in the Vista boot DVD.<br />In my case: No hope because Microsoft does not offer any usefull Recover Console.<br /><br />Searching for hours in blogs I found 99% bullshit. No solutions or misleading nonsense.<br />Only people reporting the same problem who at the end installed their Windows anew.<br /><br />Many people don't understand what a restore point is.<br />It is COMPLETELY useless to have any restore point for this kind of problem.<br /><br />One of the few interesting comments, that I found was this:<br />__________________<br /><br />First, <br />most rescue disk and other programs will not boot correctly if you have more than 2 active partitions on the harddrive, have more than 4 partitions including and extended partition with several partitions in it.<br /><br />Second, <br />Vista uses a different bootloader and thus creates a 'custom' mbr, which if modified by any standard mbr tool will cause vista not to boot. Also because of this some other CD's will not boot if they check the mbr.<br /><br />Third, <br />as of yet there are no tools that will allow you to resize or check the NTFS drive of a vista machine. If any program other than vista checks or makes any changes (including XP rescue console) to the drive such as chkdsk this may hang vista.<br /><br />Fourth, <br />many computers now include a recover partition most of the time this should be hidden, but sometimes may become active and cause problems booting.<br /><br />So these things make it more difficult to work with. I would recommend you check out the articles on dual boot with vista, as these help you understand where your system is probably hanging at.<br />__________________<br /><br /><br />4.)<br />After googling for hours I could not find any solution.<br />So I investigated on my own.<br />Like a cracker using SysInternals Process Monitor I invesigated about what BcdEdit is doing on the harddisk.<br /><br /><br />**** And I found a solution which I will describe here: ****<br /><br />I hope to receive some dollars from Microsoft giving support for their badly programmed products.<br /><br />Microsoft pays 8,5 Billions dollars to buy Skype but they don't pay one dollar to give support to the millions that suffer from a blackscreen.<br />Why are there no Microsoft employees responding in social.technet.microsoft.com ?<br /><br />The internet is full of people reporting this Winload.exe problem and no solution except the Windows Install DVD that does not work (at least in my case).<br /><br /><br />##################################################<br /><br />Here comes the solution that I found on my own:<br /><br />5.)<br />Put the harddisk with the corrupt Vista into another computer that is running Windows (in my case Windows XP).<br /><br />6.)<br />Mount the defective Vista partition on a drive (in my case F:\)<br /><br />7.)<br />On the Vista partition the file F:\Boot\BCD is the one that needs to be repaired.<br />You can make a backup of this file now, but why should you backup a corrupt file ?<br /><br /><br />This file has no extension, the name is simply "BCD".<br />This file is a database that stores the information how to boot Windows and replaces the former Boot.ini.<br />This file is hidden. If you don't see it use a real file manager like TotalComander because Windows Exporer really sucks.<br /><br />8.)<br />Open a command prompt (Cmd.exe)<br /><br />9.)<br />Enter<br />F:\Windows\System32\bcdedit /store F:\Boot\BCD /enum<br /><br />NOTE:<br />The parameter /store will access F:\Boot\BCD, otherwise it would access C:\Boot\BCD which does not exist on Windows XP!<br /><br /><br />What I saw was this:<br /><br /><br />Windows Boot Manager<br />--------------------<br />identifier {bootmgr}<br />device unknown<br />description Windows Boot Manager<br />locale en-US<br />inherit {globalsettings}<br />default {default}<br />resumeobject {1f20452f-f2af-11db-9299-adf714858873}<br />displayorder {default}<br />toolsdisplayorder {memdiag}<br />timeout 30<br /><br />Windows Boot Loader<br />-------------------<br />identifier {default}<br />device unknown<br />path \Windows\system32\winload.exe<br />description Microsoft Windows Vista<br />locale en-US<br />inherit {bootloadersettings}<br />osdevice unknown<br />systemroot \Windows<br />resumeobject {1f20452f-f2af-11db-9299-adf714858873}<br />nx OptIn<br /><br /><br /><br />This is the content of a corrupt BCD file.<br />I have no idea what destroyed this file in my case.<br />But you see that there are three lines with "unknown".<br />This is the cause why Vista does not boot anymore.<br /><br />The Windload.exe is NOT corrupt or missing.<br />The corrupt file is the BCD file, but the programmers at Microsoft are not able to show helpfull error messages.<br /><br /><br />10.)<br />Now enter the following 3 commands:<br /><br /><br />F:\Windows\System32\bcdedit /store F:\Boot\BCD /set {bootmgr} device boot<br />The operation completed successfully.<br /><br />F:\Windows\System32\bcdedit /store F:\Boot\BCD /set {default} device boot<br />The operation completed successfully.<br /><br />F:\Windows\System32\bcdedit /store F:\Boot\BCD /set {default} osdevice boot<br />The operation completed successfully.<br /><br /><br />11.)<br />To check the result enter again:<br />F:\Windows\System32\bcdedit /store F:\Boot\BCD /enum<br /><br /><br />Now it should look like this:<br /><br />Windows Boot Manager<br />--------------------<br />identifier {bootmgr}<br />device boot<br />description Windows Boot Manager<br />locale en-US<br />inherit {globalsettings}<br />default {default}<br />resumeobject {1f20452f-f2af-11db-9299-adf714858873}<br />displayorder {default}<br />toolsdisplayorder {memdiag}<br />timeout 30<br /><br />Windows Boot Loader<br />-------------------<br />identifier {default}<br />device boot<br />path \Windows\system32\winload.exe<br />description Microsoft Windows Vista<br />locale en-US<br />inherit {bootloadersettings}<br />osdevice boot<br />systemroot \Windows<br />resumeobject {1f20452f-f2af-11db-9299-adf714858873}<br />nx OptIn<br /><br /><br /><br />You see that instead of "unknown" there is a "boot" now three times.<br /><br /><br /><br />12.)<br />Now BcdEdit has fixed the BCD file and you are ready.<br /><br />Yeahh!<br /><br /><br />13.)<br />This procedure should be added to the MSDN for all those who cannot boot with the misdesigned Boot DVD.<br /><br /><br />I don't know if this procedure also works for Windows 7.<br />But I think so, try it, it should work!<br /><br /><br /><br />14.)<br />If you don't have a backup of your partitions I URGENTLY recommend that you install "Partition Backup" from Paragon Software.<br />http://www.paragon-software.com/home/br-free/index.html<br /><br />It is extremely easy to use and can create an image of entire partitions that you must OBVIOUSLY store on ANOTHER harddisk (e.g. an external USB disk or burn them on a Blue Ray).<br />It also makes a backup of the Master Boot Record.<br /><br />"Partition Backup" is better than alternatives like CloneZilla, which is very awkward to use and only has a simple text user interface.<br />And in comparison with the competition from Acronis it is for free!<br /><br />With the backups of your partitions and the Paragon Rescue DVD you will never again have to care about any Windows that does not boot.<br />You simply play back the image.<br /><br /><br /><br />P.S.<br />If you are interested in more technical details about BCD and the Vista boot process, read this excellent article:<br />http://www.multibooters.co.uk/bootmgr.html<br /><br /><br />Elmü<br /><br />

Epic_Geek
Why so difficult
this is kinda lame. why did Microsoft make it harder to edit the boot menu? Windows XP was easy. I'm going linux once Windows7 is obsolete. As difficult as Windows is getting, I might as well enjoy a free OS that's equally as difficult, more powerful, and has greater community support right?<br />
Tags :

Zachmann
Complete doc?
This is amazingly incomplete - in particular set has many options and none are listed. The click-through to the hardware center doesn't go anywhere. How about real doc? For example, what are the formats, types, ways to use set. Sending us to bcdedit /? is lame and still incomplete.
Tags :

Cynical Cat
Character set support in BCDEDIT
It's not clear what character set BCDEDIT uses/supports. In some simple experiments, it seems to be using ANSI, but that may simply have been because I was using it from an English language Windows environment.<div><br /></div><div>It would be helpful to have some explicit statement about the character set/s that it will accept, and what it will return.</div>

J. Patrick Kelley
add cross-reference to FAQ
This topic could be greatly improved by the addition of specific examples, such as those found in the BCDEDIT FAQ: <mtps:InstrumentedLink NavigateUrl="http://technet.microsoft.com/en-us/library/cc721886(WS.10).aspx" runat="server" xmlns:mtps="http://msdn2.microsoft.com/mtps">http://technet.microsoft.com/en-us/library/cc721886(WS.10).aspx</mtps:InstrumentedLink>
Tags : bcdedit

Thecurnyl
Recovery Options Timeout
Is it possible to use BCDEDIT to enable and change the time in seconds for "Time to display recovery options when needed" option? I want to automate the configuration of this option for Windows 2008 R2. Thanks.
Tags :

Page view tracker