programming4us
programming4us
DESKTOP

Installing or Upgrading Windows 8 : Customizing the Boot Configuration Data (part 3) - Using BCDEDIT to Customize the Startup Options

5/4/2014 1:32:02 AM

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 by running a Command Prompt session with elevated privileges, as described in the following steps:

1. Press Windows Logo+X. A menu of power user commands appears.

2. Click Command Prompt (Admin). The User Account Control dialog box appears.

3. Either click Yes or type an administrator password and click Yes. 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

Image
Image

To help you understand how BCDEDIT works, let’s examine the output that appears when you run BCDEDIT with the /enum switch on a system that dual-boots Windows 8 and Windows 7:

Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  partition=\Device\HarddiskVolume1
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
integrityservices       Enable
default                 {current}
resumeobject            {14d214f2-caf4-11e1-b73a-83d46d071b71}
displayorder            {current}
                        {14d214ef-caf4-11e1-b73a-83d46d071b71}
toolsdisplayorder       {memdiag}
timeout                 30

Windows Boot Loader
-------------------
identifier              {current}
device                  partition=C:
path                    \Windows\system32\winload.exe
description             Windows 8
locale                  en-US
inherit                 {bootloadersettings}
recoverysequence        {14d214f4-caf4-11e1-b73a-83d46d071b71}
integrityservices       Enable
recoveryenabled         Yes
allowedinmemorysettings 0x15000075
osdevice                partition=C:
systemroot              \Windows
resumeobject            {14d214f2-caf4-11e1-b73a-83d46d071b71}
nx                      OptIn
bootmenupolicy          Standard

Windows Boot Loader
-------------------
identifier              {14d214ef-caf4-11e1-b73a-83d46d071b71}
device                  partition=D:
path                    \Windows\system32\winload.exe
description             Windows 7
locale                  en-US
inherit                 {bootloadersettings}
recoverysequence        {14d214f0-caf4-11e1-b73a-83d46d071b71}
recoveryenabled         Yes
osdevice                partition=D:
systemroot              \Windows
resumeobject            {14d214ee-caf4-11e1-b73a-83d46d071b71}
nx                      OptIn

Here’s another example from a system that dual-boots with Windows XP:

Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  partition=D:
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
integrityservices       Enable
default                 {current}
resumeobject            {bdf44e81-cad5-11e1-b38b-cbbdd9e7fb08}
displayorder            {ntldr}
                        {current}
toolsdisplayorder       {memdiag}
timeout                 30

Windows Legacy OS Loader
------------------------
identifier              {ntldr}
device                  partition=D:
path                    \ntldr
description             Earlier Version of Windows

Windows Boot Loader
-------------------
identifier              {current}
device                  partition=C:
path                    \Windows\system32\winload.exe
description             Windows 8
locale                  en-US
inherit                 {bootloadersettings}
recoverysequence        {bdf44e83-cad5-11e1-b38b-cbbdd9e7fb08}
integrityservices       Enable
recoveryenabled         Yes
allowedinmemorysettings 0x15000075
osdevice                partition=C:
systemroot              \Windows
resumeobject            {bdf44e81-cad5-11e1-b38b-cbbdd9e7fb08}
nx                      OptIn
bootmenupolicy          Standard

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 Windows 8 installs (on our test 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 first Windows Boot Loader item:

14d214f4-caf4-11e1-b73a-83d46d071b71

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):

bootmgr—The Windows Boot Manager entry

ntldr—An entry that uses a legacy operating system loader (NTLDR) to boot previous versions of Windows

current—The entry that corresponds to the operating system that is currently running

default—The entry that corresponds to the Windows Boot Manager default operating system

memdiag—The Windows Memory Diagnostics entry (deprecated in Windows 8)

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 we’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 Windows 8 installs get the same name: Microsoft Windows, which can be quite confusing. Names such as Windows 8 Home Premium and Windows 8 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} /addlast

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}

Installing Windows 8 Components

Like a hostess who refuses to put out the good china for just anybody, Windows 8 doesn’t install all of its components automatically. Don’t feel insulted; Windows is just trying to go easy on your hard disk. The problem, you see, is that some of the components that come with Windows 8 are software behemoths that will happily usurp acres of your precious hard-disk land. In a rare act of digital politeness, Windows bypasses these programs (as well as a few other nonessential tidbits) during a typical installation. If you want any of these knickknacks on your system, you have to tell Windows 8 to install them for you.

The good news about installing features is that Windows 8 makes it easy to add any of those missing pieces to your system without having to dig out the installation media (wherever it may be) or (shudder) trudge through the entire Windows installation routine. That’s because when Windows 8 was foisting itself upon your PC, it was thoughtful enough to also deposit the files necessary to install the features on your hard drive. They reside in a special folder in a compressed format so they don’t take up much room. You must tell Windows 8 to decompress them, which sounds hard, but it’s not. You just have to follow these steps:

1. Press Windows Logo+W to open the Settings search pane, type features, and then click Turn Windows Features On or Off. The Windows Features dialog box appears, as shown in Figure 4.

Image

Figure 4. The Windows Features dialog box helps you add the bits and pieces that come with Windows 8.

2. If a component has a plus sign (+), it means it has multiple subcomponents. Click the plus sign to see those subcomponents.

3. Activate the check box beside the component you want to install.

4. Click OK. Windows 8 installs the feature.

Other  
  •  Installing or Upgrading Windows 8 : Dual- (and Multi-) Booting Windows 8 (part 2) - Using Windows Boot Manager
  •  Installing or Upgrading Windows 8 : Dual- (and Multi-) Booting Windows 8 (part 1)
  •  Upgrading Windows 8 : Upgrading from Windows 7,Upgrading from Windows Vista, Upgrading from Windows XP , Running the Upgrade
  •   Installing or Upgrading Windows 8 : Preparing Your System: A Checklist - Installing Windows 8
  •   Installing or Upgrading Windows 8 : Preparing Your System: A Checklist
  •   Installing or Upgrading Windows 8 : Windows 8 System Requirements - Hardware Requirements for Various Windows 8 Features
  •  Lenovo ThinkCentre E93z All-in-one PC
  •  Gaming PC Vibox Hyperion 2013
  •  IMac 21.5 Inch And 27 Inch (Late 2013) Review (Part 2)
  •  IMac 21.5 Inch And 27 Inch (Late 2013) Review (Part 1)
  •  
    video
     
    Video tutorials
    - How To Install Windows 8

    - How To Install Windows Server 2012

    - How To Install Windows Server 2012 On VirtualBox

    - How To Disable Windows 8 Metro UI

    - How To Install Windows Store Apps From Windows 8 Classic Desktop

    - How To Disable Windows Update in Windows 8

    - How To Disable Windows 8 Metro UI

    - How To Add Widgets To Windows 8 Lock Screen

    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010
    programming4us programming4us
    programming4us
     
     
    programming4us