BCDEdit Command-Line Options

11
BCDEdit Command-Line Options http://technet.microsoft.com/en-us/library/cc709667(v=ws.10).aspx[15/04/2013 6:37:49 AM] 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 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 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 TechNet Products IT Resources Downloads Training Support

description

doc.

Transcript of BCDEdit Command-Line Options

Page 1: BCDEdit Command-Line Options

BCDEdit Command-Line Options

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

BCDEdit Command-Line Options84 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 storeeffectively 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 bootmenu 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 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 datatypes, consider using the BCD Windows Management Instrumentation (WMI) application programming interface (API) to create more powerful and flexible custom tools.

BCDEdit Command-Line OptionsThe 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 helpfor a particular command, run bcdedit /? command, where command is the name of the command you are searching for more information about. Forexample, bcdedit /? createstore displays detailed help for the Createstore command.

BCDEdit Command-Line Options that Operate on a Store

United States (English) Sign in

Home Windows 8 Windows 7 Windows Vista Windows XP MDOP Windows Intune Library Forums

TechNet LibraryWindowsWindows VistaWindows Vista Technical LibraryRoadmapDeploymentWindows Automated Installation Kit(Windows AIK)Deployment Tools Technical Reference

Command-Line Tools TechnicalReference

BCDEdit Command-LineOptionsBootsect Command-LineOptionsDiskPart Command-Line OptionsDrvload Command-Line OptionsExpand Command-Line OptionsIntlcfg Command-Line OptionsLpksetup Command-LineOptionsOscdimg Command-LineOptionsPEImg Command-Line OptionsPowercfg Command-LineOptionsWinpeshl.ini FilesWpeinit Command-Line OptionsWpeutil Command-Line OptionsPostReflect Command-LineOptionsVSP1CLN Command-LineOptions

TechNet Products IT Resources Downloads Training Support

Page 2: BCDEdit Command-Line Options

BCDEdit Command-Line Options

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

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 thesystem 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 existingentries 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 thesystem 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 cannotbe 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 thebcdedit /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 displaysall 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 onlythe next time the computer starts. Afterwards, the computer reverts to the original display order.

Page 3: BCDEdit Command-Line Options

BCDEdit Command-Line Options

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

/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 bootapplications.

/dbgsettings Specifies or displays the global debugger settings for the system. This command does not enable or disable the kernel debugger; use the /debug optionfor 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 bootdebug.

-or-

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 BootManager menu.

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

bcdedit /set <id> debug on

Copy

bcdedit /set <id> bootdebug on

Copy

Page 4: BCDEdit Command-Line Options

BCDEdit Command-Line Options

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

Community Additions ADD

Did you find this helpful? Yes No

Deleting entriesAmazing... 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 bothhave same GUID. The article does not explain this...

Exotic Hadron

8/24/2012

reference for bcdedit /set optionshttp://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!

Page 5: BCDEdit Command-Line Options

BCDEdit Command-Line Options

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

***** 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.exeStatus: 0xc000000eInfo: 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 PartitionMagic, 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 usedBootrec /RebuildBCDorBootrec /FixBoot

Page 6: BCDEdit Command-Line Options

BCDEdit Command-Line Options

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

orBcdEdit /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 extendedpartition 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'swill 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 XPrescue 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 isprobably 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).

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

Page 7: BCDEdit Command-Line Options

BCDEdit Command-Line Options

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

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.)EnterF:\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 unknowndescription Windows Boot Managerlocale en-USinherit {globalsettings}default {default}resumeobject {1f20452f-f2af-11db-9299-adf714858873}displayorder {default}toolsdisplayorder {memdiag}timeout 30

Windows Boot Loader-------------------identifier {default}device unknownpath \Windows\system32\winload.exedescription Microsoft Windows Vistalocale en-USinherit {bootloadersettings}osdevice unknown

Page 8: BCDEdit Command-Line Options

BCDEdit Command-Line Options

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

systemroot \Windowsresumeobject {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 bootThe operation completed successfully.

F:\Windows\System32\bcdedit /store F:\Boot\BCD /set {default} device bootThe operation completed successfully.

F:\Windows\System32\bcdedit /store F:\Boot\BCD /set {default} osdevice bootThe 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 bootdescription Windows Boot Managerlocale en-USinherit {globalsettings}default {default}resumeobject {1f20452f-f2af-11db-9299-adf714858873}displayorder {default}toolsdisplayorder {memdiag}timeout 30

Windows Boot Loader-------------------identifier {default}device boot

Page 9: BCDEdit Command-Line Options

BCDEdit Command-Line Options

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

path \Windows\system32\winload.exedescription Microsoft Windows Vistalocale en-USinherit {bootloadersettings}osdevice bootsystemroot \Windowsresumeobject {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 BlueRay).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ü

Page 10: BCDEdit Command-Line Options

BCDEdit Command-Line Options

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

© 2013 Microsoft

Manage Your Profile

Newsletter | Contact Us | Privacy Statement | Terms of Use | Trademarks | Site Feedback

ElmueSoft

11/20/2011

Why so difficultthis 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, Imight 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? Forexample, 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 BCDEDITIt'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 anEnglish 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 FAQThis topic could be greatly improved by the addition of specific examples, such as those found in the BCDEDIT FAQ: http://technet.microsoft.com/en-us/library/cc721886(WS.10).aspx

J. Patrick Kelley

1/7/2011

Recovery Options TimeoutIs 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 thisoption for Windows 2008 R2. Thanks.

Thecurnyl

1/28/2010

Page 11: BCDEdit Command-Line Options

BCDEdit Command-Line Options

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