Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Vista

Custom Startups Using the Boot Configuration Data (part 2) - Using BCDEDIT to Customize the Startup Options

- Windows 10 Product Activation Keys Free 2019 (All Versions)
- How To Bypass Torrent Connection Blocking By Your ISP
- How To Install Actual Facebook App On Kindle Fire
9/17/2011 6:21:12 PM

Using BCDEDIT to Customize the Startup Options

The System Configuration Utility makes it easy to modify BCD store items, but it doesn’t give you access to the entire BCD store. For example, the Boot tab doesn’t list any legacy boot items on your system, and there are no options for renaming boot items, or changing the order in which the boot items are displayed in the Windows Boot Manager menu. For these tasks, and indeed for every possible BCD task, you need to use the BCDEDIT command-line tool.

Note that BCDEDIT is an Administrator-only tool, so you must run it under the Administrator account (not just any account in the Administrators group). The easiest way to do this is elevate your privileges when running the Command Prompt, as described in the following steps:

1.
Select Start, All Programs, Accessories.

2.
Right-click Command Prompt and then click Run as Administrator. The User Account Control dialog box appears.

3.
Either click Continue or type an administrator password and click Submit. The Command Prompt window appears


Table 1 summarizes the switches you can use with BCDEDIT.

Table 1. Switches Available for the BCDEDIT Command-Line Tool
SwitchDescription
/bootdebugToggles boot debugging for a boot application on and off
/bootemsToggles Emergency Management Services for a boot application on and off
/bootsequenceSets the one-time boot sequence for the boot manager
/copyMakes a copy of an entry
/createCreates a new entry
/createstoreCreates a new and empty BCD store
/dbgsettingsSets the global debugger settings
/debugToggles kernel debugging for an operating system entry
/defaultSets the default entry
/deleteDeletes an entry
/deletevalueDeletes an entry value
/displayorderSets the order in which Boot Manager displays the operating system entries
/emsEnables or disables Emergency Management Services for an operating system entry
/emssettingsSets the global Emergency Management Services settings
/enumLists the entries in the BCD store
/exportExports the contents of the BCD store to a file
/importRestores the BCD store from a backup file created with the /export switch
/setSets an option value for an entry
/storeSpecifies the BCD store to use
/timeoutSets the Boot Manager timeout value
/toolsdisplayorderSets the order in which Boot Manager displays the Tools menu
/typesDisplays the data types required by the /set and /deletevalue commands.
/vDisplays all entry identifiers in full, instead of using well-known identifiers

To help you understand how BCDEDIT works, let’s examine the output that appears when you run BCDEDIT with the /enum switch:

Windows Boot Manager
--------------------
Identifier: {bootmgr}
Type: 10100002
Device: partition=C:
Description: Windows Boot Manager
Inherit options: {globalsettings}
Boot debugger: No
Default: {current}
Display order: {ntldr}
{current}
{a8ef3a39-a0a4-11da-bedf-97d9bf80e36c}
Tools display order: {memdiag}
Timeout: 30

Windows Legacy OS Loader
------------------------
Identifier: {ntldr}
Type: 10300006
Device: partition=C:
Path: \ntldr
Description: Earlier version of Windows
Boot debugger: No

Windows Boot Loader
-------------------
Identifier: {current}
Type: 10200003
Device: partition=C:
Path: \Windows\system32\winload.exe
Description: Microsoft Windows Vista
Locale: en-US
Inherit options: {bootloadersettings}
Boot debugger: Yes
Windows device: partition=D:
Windows root: \Windows
Resume application: {c105ff07-b93e-11da-82e5-ae629af91d6e}
No Execute policy: OptIn
Kernel debugger: No
EMS enabled in OS: No

Windows Boot Loader
-------------------
Identifier: {a8ef3a39-a0a4-11da-bedf-97d9bf80e36c}
Type: 10200003
Device: partition=G:
Path: \Windows\system32\winload.exe
Description: Microsoft Windows Vista
Locale: en-US
Inherit options: {bootloadersettings}
Boot debugger: No
Windows device: partition=G:
Windows root: \Windows
Resume application: {a8ef3a3a-a0a4-11da-bedf-97d9bf80e36c}
No Execute policy: OptIn
No integrity checks: Yes
Kernel debugger: No
EMS enabled in OS: No


As you can see, this BCD store has four entries: one for Windows Boot Manager, one for a legacy Windows install (on partition C:), and two for Vista installs (on my text machine, partitions D: and G:). Notice that each entry has an Identifier setting, and these IDs are unique to each entry. All IDs are actually 32-digit globally unique identifiers (GUIDs) such as the one shown earlier for the second Windows Boot Loader item:

a8ef3a39-a0a4-11da-bedf-97d9bf80e36c

The other entries have GUIDs, as well, but by default BCDEDIT works with a collection of well-known identifiers, including the following (type bcdedit id /? to see the complete list):



bootmgrThe Windows Boot Manager entry
ntldrAn entry that uses a legacy operating system loader (NTLDR) to boot previous versions of Windows
currentThe entry that corresponds to the operating system that is currently running
defaultThe entry that corresponds to the Windows Boot Manager default operating system
memdiagThe Windows Memory Diagnostics entry

If you want to see the full GUIDs for every entry, add the /v (verbose) switch:

bcdedit /enum /v

It would take dozens of pages to run through all the BCDEDIT switches, so I’ll just give you a few examples so you can get a taste of how this powerful utility operates.

Making a Backup Copy of the BCD Store

Before you do any work on the BCD store, you should make a backup copy. That way, if you make an error when you change something in the BCD, you can always restore the backup copy to get your system back to its original state.

You create a backup copy using the /export switch. For example, the following command backs up the BCD store to a file named bcd_backup in the root folder of drive C:

bcdedit /export c:\bcd_backup

If you need to restore the backup, use the /import switch, as in this example:

bcdedit /import c:\bcd_backup

Renaming an Entry

The names that Windows Boot Manager assigns to the boot applications leave a lot to be desired. For a legacy operating system entry, for example, the default Legacy (pre-Longhorn) Microsoft Windows Operating System name is overly long and not particularly descriptive. A simpler name such as Windows XP Pro or Windows 2000 would be much more useful. Similarly, all Vista installs get the same name: Microsoft Windows, which can be quite confusing. Names such as Vista Home Premium and Vista Ultimate would be much more understandable.

To rename an entry using BCDEDIT, use the following syntax:

bcdedit /set {id} description “name

Here, replace id with the entry identifier (the GUID or the well-known identifier, if applicable) and replace name with the new name you want to use. For example, the following command replaces the current name of the legacy operating system entry (ntldr) with Windows XP Pro:

bcdedit /set {ntldr} description “Windows XP Pro”

Tip

GUIDs are 32-character values, so typing them by hand is both time-consuming and error-prone. To avoid this, first run the bcdedit /enum command to enumerate the BCD entries, and then scroll up until you see the GUID of the entry with which you want to work. Pull down the system menu (click the upper-left corner of the window or press Alt+Spacebar), select Edit, Mark, click-and-drag over the GUID to select it, and then press the Enter key to copy it. Begin typing your BCDEDIT command and when you get to the part where the identifier is required, pull down the system menu again and select Edit, Paste.


Changing the Order of the Entries

If you’d prefer that the Boot Manager menu entries appear in a different order, you can use BCDEDIT’s /displayorder switch to change the order. In the simplest case, you might want to move an entry to either the beginning or the end of the menu. To send an entry to the beginning, include the /addfirst switch. Here’s an example:

bcdedit /displayorder {a8ef3a39-a0a4-11da-bedf-97d9bf80e36c} /addfirst

To send an entry to the end of the menu, include the /addlast switch instead, as in this example:

bcdedit /displayorder {current} /addfirst

To set the overall order, include each identifier in the order you want, separated by spaces:

bcdedit /displayorder {current} {a8ef3a39-a0a4-11da-bedf-97d9bf80e36c} {ntldr}					  
Other -----------------
- Custom Startups Using the Boot Configuration Data (part 1) - Using Startup and Recovery to Modify the BCD & Using the System Configuration Utility to Modify the BCD
- Customizing and Troubleshooting the Windows Vista Startup : The Boot Process, from Power Up to Startup
- Using Control Panel and Group Policies : Implementing Group Policies with Windows Vista
- Using Control Panel and Group Policies : Operating Control Panel
- Troubleshooting Device Problems
- Managing Your Hardware with Device Manager
- Getting the Most Out of Device Manager : Tips and Techniques for Installing Devices
- Maintaining Your Windows Vista System : Reviewing Event Viewer Logs
- Maintaining Your Windows Vista System : Checking for Updates and Security Patches
- Maintaining Your Windows Vista System : Backing Up Your Files
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Popular tags
Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 windows Phone 7 windows Phone 8
programming4us programming4us
Celebrity Style, Fashion Trends, Beauty and Makeup Tips.
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server