Sie sind auf Seite 1von 11

BCDEdit Command-Line Options

TechNet Products IT Resources Downloads Training Support

United States (English)

Sign in

Home

Windows 8

Windows 7

Windows Vista

Windows XP

MDOP

Windows Intune

Library

Forums

TechNet Library Windows Windows Vista Windows Vista Technical Library Roadmap Deployment Windows Automated Installation Kit (Windows AIK) Deployment Tools Technical Reference Command-Line Tools Technical Reference BCDEdit Command-Line Options Bootsect Command-Line Options DiskPart Command-Line Options Drvload Command-Line Options Expand Command-Line Options Intlcfg Command-Line Options Lpksetup Command-Line Options Oscdimg Command-Line Options PEImg Command-Line Options Powercfg Command-Line Options Winpeshl.ini Files Wpeinit Command-Line Options Wpeutil Command-Line Options PostReflect Command-Line Options VSP1CLN Command-Line Options

BCDEdit Command-Line Options


84 out of 178 rated this helpful - Rate this topic 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. Note Administrative privileges are required to use BCDEdit to modify BCD. BCDEdit is the primary tool for editing the boot configuration of WindowsVista and later versions of Windows. It is included with the WindowsVista 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

http://technet.microsoft.com/en-us/library/cc709667(v=ws.10).aspx[15/04/2013 6:37:49 AM]

BCDEdit Command-Line Options

Option /createstore /export

Description Creates a new empty boot configuration data store. The created store is not a system store. 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. 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. 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.

/import

/store

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

Option /copy /create Description Makes a copy of a specified boot entry in the same system store. 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. Deletes an element from a specified entry.

/delete

BCDEdit Command-Line Options that Operate on Entry Options

Option /deletevalue /set Description Deletes a specified element from a boot entry. Sets an entry option value.

BCDEdit Command-Line Options that Control Output

Option /enum Description 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. 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.

/v

BCDEdit Command-Line Options that Control the Boot Manager

Option /bootsequence Description 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.

http://technet.microsoft.com/en-us/library/cc709667(v=ws.10).aspx[15/04/2013 6:37:49 AM]

BCDEdit Command-Line Options

/default /displayorder /timeout /toolsdisplayorder

Specifies the default entry that the boot manager selects when the timeout expires. Specifies the display order that the boot manager uses when displaying boot options to a user. Specifies the time to wait, in seconds, before the boot manager selects the default entry. 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 /bootems /ems /emssettings Description Enables or disables Emergency Management Services (EMS) for the specified entry. Enables or disables EMS for the specified operating system boot entry. 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 /bootdebug Description 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. 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. Enables or disables the kernel debugger for a specified boot entry.

/dbgsettings

/debug

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.
Copy

bcdedit /set <id> debug on

-orCopy

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.

http://technet.microsoft.com/en-us/library/cc709667(v=ws.10).aspx[15/04/2013 6:37:49 AM]

BCDEdit Command-Line Options

Did you find this helpful?

Yes

No

Community Additions

ADD

Deleting entries
Amazing... there are tons of information about bcdedit and non contains an example of deleting an entry.

How do I delete a replicated entry:

bcedit /copy {current} /d "Replicated"

This newly created entry will create a yet another one boot entry with the SAME GUID as used in the current (default) boot entry.

Now that suppose I want to delete this replicated entry. How do I do that? What will do the following:

bcdedit /d {GUID}

where GUID is the one used for the Replicated entry? What will it delete? The {current} entry? The Replicated entry? How will it distinguish between entries provided that both have same GUID. The article does not explain this...
Exotic Hadron 8/24/2012

reference for bcdedit /set options


http://msdn.microsoft.com/en-us/library/windows/hardware/ff542202(v=vs.85).aspx
BryanLockwood 12/29/2011

Winload.exe is missing or corrupt - Recover DVD does not boot - Problem SOLVED!
How to use BCDEDIT in case of emergency:

After a power failure the Master Boot Record (MBR) got destroyed on my harddisk. My entire harddisk appeared to be an unpartitioned area. All partitions were gone! http://technet.microsoft.com/en-us/library/cc709667(v=ws.10).aspx[15/04/2013 6:37:49 AM]

BCDEdit Command-Line Options ***** Shock! ***** ***** Panic! ***** As software developer I have a multi-boot system with several operating systems and a huge data partition. I was not willing to install all this anew.

1.) So I searched for a tool that may recover the MBR. And I found "EaseUs Partition Recovery". http://www.softpedia.com/get/System/Back-Up-and-Recovery/EASEUS-Partition-Recovery.shtml I put the corrupted disk into another computer. This program scanned my disk and found all partitions within one minute. It allowed me to enable the partitions and I saw that all data was still there. And the best of all: This program did that great work for free!

2.) 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: ######################################################################################## Windows failed to start. A recent hardware or software change might be the cause. File: \Windows\System32\winload.exe Status: 0xc000000e Info: The selected entry could not be loaded because the application is missing or corrupt. ######################################################################################## This error message is (as I'am sure now) a complete nonsense. As usual in Microsoft products the error messages are wrong or at least misleading. The file Winload.exe is neither missing nor corrupt! 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. 3.) 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. But in my case this did not work. This stupid DVD did not boot. In the middle of the boot process it was hanging without any error message. No chance at all. It's from Microsoft, so we cannot expect too much.

Other people used Bootrec /RebuildBCD or Bootrec /FixBoot http://technet.microsoft.com/en-us/library/cc709667(v=ws.10).aspx[15/04/2013 6:37:49 AM]

BCDEdit Command-Line Options or BcdEdit /xyz... from the rescue console in the Vista boot DVD. In my case: No hope because Microsoft does not offer any usefull Recover Console. Searching for hours in blogs I found 99% bullshit. No solutions or misleading nonsense. Only people reporting the same problem who at the end installed their Windows anew. Many people don't understand what a restore point is. It is COMPLETELY useless to have any restore point for this kind of problem. One of the few interesting comments, that I found was this: __________________ First, 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. Second, 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. Third, 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. Fourth, many computers now include a recover partition most of the time this should be hidden, but sometimes may become active and cause problems booting. 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. __________________

4.) After googling for hours I could not find any solution. So I investigated on my own. Like a cracker using SysInternals Process Monitor I invesigated about what BcdEdit is doing on the harddisk.

**** And I found a solution which I will describe here: **** I hope to receive some dollars from Microsoft giving support for their badly programmed products. 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. Why are there no Microsoft employees responding in social.technet.microsoft.com ? 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).

##################################################

http://technet.microsoft.com/en-us/library/cc709667(v=ws.10).aspx[15/04/2013 6:37:49 AM]

BCDEdit Command-Line Options Here comes the solution that I found on my own: 5.) Put the harddisk with the corrupt Vista into another computer that is running Windows (in my case Windows XP). 6.) Mount the defective Vista partition on a drive (in my case F:\) 7.) On the Vista partition the file F:\Boot\BCD is the one that needs to be repaired. You can make a backup of this file now, but why should you backup a corrupt file ?

This file has no extension, the name is simply "BCD". This file is a database that stores the information how to boot Windows and replaces the former Boot.ini. This file is hidden. If you don't see it use a real file manager like TotalComander because Windows Exporer really sucks. 8.) Open a command prompt (Cmd.exe) 9.) Enter F:\Windows\System32\bcdedit /store F:\Boot\BCD /enum NOTE: The parameter /store will access F:\Boot\BCD, otherwise it would access C:\Boot\BCD which does not exist on Windows XP!

What I saw was this:

Windows Boot Manager -------------------identifier {bootmgr} device unknown description Windows Boot Manager locale en-US inherit {globalsettings} default {default} resumeobject {1f20452f-f2af-11db-9299-adf714858873} displayorder {default} toolsdisplayorder {memdiag} timeout 30 Windows Boot Loader ------------------identifier {default} device unknown path \Windows\system32\winload.exe description Microsoft Windows Vista locale en-US inherit {bootloadersettings} osdevice unknown http://technet.microsoft.com/en-us/library/cc709667(v=ws.10).aspx[15/04/2013 6:37:49 AM]

BCDEdit Command-Line Options systemroot \Windows resumeobject {1f20452f-f2af-11db-9299-adf714858873} nx OptIn

This is the content of a corrupt BCD file. I have no idea what destroyed this file in my case. But you see that there are three lines with "unknown". This is the cause why Vista does not boot anymore. The Windload.exe is NOT corrupt or missing. The corrupt file is the BCD file, but the programmers at Microsoft are not able to show helpfull error messages.

10.) Now enter the following 3 commands:

F:\Windows\System32\bcdedit /store F:\Boot\BCD /set {bootmgr} device boot The operation completed successfully. F:\Windows\System32\bcdedit /store F:\Boot\BCD /set {default} device boot The operation completed successfully. F:\Windows\System32\bcdedit /store F:\Boot\BCD /set {default} osdevice boot The operation completed successfully.

11.) To check the result enter again: F:\Windows\System32\bcdedit /store F:\Boot\BCD /enum

Now it should look like this: Windows Boot Manager -------------------identifier {bootmgr} device boot description Windows Boot Manager locale en-US inherit {globalsettings} default {default} resumeobject {1f20452f-f2af-11db-9299-adf714858873} displayorder {default} toolsdisplayorder {memdiag} timeout 30 Windows Boot Loader ------------------identifier {default} device boot http://technet.microsoft.com/en-us/library/cc709667(v=ws.10).aspx[15/04/2013 6:37:49 AM]

BCDEdit Command-Line Options path \Windows\system32\winload.exe description Microsoft Windows Vista locale en-US inherit {bootloadersettings} osdevice boot systemroot \Windows resumeobject {1f20452f-f2af-11db-9299-adf714858873} nx OptIn

You see that instead of "unknown" there is a "boot" now three times.

12.) Now BcdEdit has fixed the BCD file and you are ready. Yeahh!

13.) This procedure should be added to the MSDN for all those who cannot boot with the misdesigned Boot DVD.

I don't know if this procedure also works for Windows 7. But I think so, try it, it should work!

14.) If you don't have a backup of your partitions I URGENTLY recommend that you install "Partition Backup" from Paragon Software. http://www.paragon-software.com/home/br-free/index.html 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). It also makes a backup of the Master Boot Record. "Partition Backup" is better than alternatives like CloneZilla, which is very awkward to use and only has a simple text user interface. And in comparison with the competition from Acronis it is for free! 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. You simply play back the image.

P.S. If you are interested in more technical details about BCD and the Vista boot process, read this excellent article: http://www.multibooters.co.uk/bootmgr.html

Elm

http://technet.microsoft.com/en-us/library/cc709667(v=ws.10).aspx[15/04/2013 6:37:49 AM]

BCDEdit Command-Line Options


ElmueSoft 11/20/2011

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?
Epic_Geek 10/5/2011

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.
Zachmann 10/3/2011

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. It would be helpful to have some explicit statement about the character set/s that it will accept, and what it will return.
Cynical Cat 4/1/2011

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: http://technet.microsoft.com/enus/library/cc721886(WS.10).aspx
J. Patrick Kelley 1/7/2011

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.
Thecurnyl 1/28/2010

Manage Your Profile Newsletter | Contact Us | Privacy Statement | Terms of Use | Trademarks | Site Feedback 2013 Microsoft

http://technet.microsoft.com/en-us/library/cc709667(v=ws.10).aspx[15/04/2013 6:37:49 AM]

BCDEdit Command-Line Options

http://technet.microsoft.com/en-us/library/cc709667(v=ws.10).aspx[15/04/2013 6:37:49 AM]

Das könnte Ihnen auch gefallen