wibiya toolbar

Sunday, August 30, 2009

The Secrets of Windows Vista’s BCDEDIT

The Secrets of Windows Vista’s BCDEDIT:-
Baffled by Windows Vista’s BCDEDIT command-line tool for customizing multiboot startups? Who isn’t? Here’s an easy guide to its basics.
If you’re only looking to customize the basics of your Windows Vista multiboot system, there’s no need to download and install VistaBootPRO .You can, instead, directly hack the BCD store using BCDEDIT.

Before you get started, you need a little introduction to the BCD store, and how BCDEDIT lets you edit it. The BCD is made up of a series of objects, each of which is a boot environment application, such as a boot manager. Each object, in turn, is made up of a series of elements. And each element has an attribute that tells how it will be used.

For example, the Windows Boot Manager in the BCD handles the initial startup of the PC, and displays a multiboot menu. One of the elements in the Windows Boot Manager is timeout, which determines how long to display the multiboot menu before loading the default operating system. The timeout element’s option is a number, such as 30, which determines how long (in seconds) to display the screen.

There’s one more thing you need to know about the BCD. When you use BCDEDIT to edit the BCD, you often need to use a GUID (Globally Unique Identifier) of an object of some kind. For example, a partition on a PC has its own GUID, which looks something like this: {b37c75ca-dd09-11d8-9a7e-
1030581395c7}.

That GUID for the partition is unique. But there are also GUIDs that are predefined, and are exactly the same from PC to PC. For example, the Windows Legacy OS Loader, used to load Windows XP and Windows 2000, always has the GUID {466f5a88-0af2-4f76-9038-095b170dc21c}. To make it somewhat easier to use BCD, aliases represent these universal, predefined GUIDs. So instead of using {466f5a88-0af2-4f76-9038-095b170dc21c}, you can use the alias {ntldr}.

With that background behind us, it’s time to actually use BCDEDIT. It’s a command-line tool, and you need to run it as an administrator. Type cmd at the Search box on the Start menu, right-click the cmd icon that appears at the top of the Start menu, and select Run as administrator.
Before doing any editing, it’s a good idea to back up the BCD store, so that you can late restore it, if you do any kind of damage. Create a folder for the BCD store on another drive or a removable disk.
In our example, we’ll say that you’re going to back it up to your D: drive. So create a folder called \BCD Backup on your D: drive. Once you’ve done that, type this command and press Enter to back up the BCD store to it:

bcdedit /export "D:\BCD Backup\Bcd Backup"

If you later need to restore the BCD store, type this command:

bcdedit /import "D:\BCD Backup\Bcd Backup"

Next, take a look at how your multiboot system is set up. At the command line, type bcdedit and press Enter. You’ll see a listing like this:


We’re not going to edit most of this. We’re going to change only the basics, because a full explanation of how to use BCDEDIT is well beyond the scope of this book. And besides, there are much easier ways to work with the BCD store.

Note all the listings with curly braces { } around them. These are GUIDs. Most are aliases, such as
{ntldr}.

The first main listing is Windows Boot Manager, which handles the initial startup. The elements underneath it detail its path, the language it’s in, and so on. It’s mainly self-explanatory. The next listing, Windows Legacy OS Loader, is the loader used to load Windows XP or Windows 2000. The final listing, Windows Boot Loader, is used to load Windows Vista.

So what does this entire listing tell us? The multiboot window will be displayed for 30 seconds, as you can see in the timeout listing of 30 under Windows Boot Manager. Windows Vista is the default operating system that loads after 30 seconds if no action is taken. You can tell that because the default listing in Windows Boot Manager is {current}—and as you can see, the identifier directly under Windows Boot Loader is {current} and its description is Microsoft Windows Vista.

On the multiboot menu that appears when the PC starts, the first listing will be for the previous version of Windows, and the text will read Earlier Version of Windows. The second listing will be for Windows Vista, and the text will read Microsoft Windows Vista.

You can tell that because the displayorder under Windows Boot Manager is {ntldr} fi rst, and {current} second. And if you look in the description of Windows Legacy OS Loader, you’ll see Earlier Version of Windows, and in the description of Windows Boot Loader, you’ll see Microsoft Windows Vista.

To make changes with BCDEDIT, you use a variety of switches. For details, type bcdedit /?, and you’ll get a list of switches, and how to use them. You need to use the switches in concert with GUIDs and attributes. For example, if you wanted to change the boot menu so that instead of displaying Earlier Version of Windows, it displayed Windows XP, you’d issue this command and press Enter.
bcdedit /set {ntldr} description "Windows XP" Similarly, if you wanted to change the menu so that it displayed Windows Vista Ultimate instead of
Microsoft Windows Vista, you’d issue this command and press Enter:
bcdedit /set {current} description "Windows Vista Ultimate".

To change the amount of time the menu appears before booting into the default operating system to 20 seconds, type this command and press Enter:
bcdedit /timeout 15 To have your PC boot into Windows XP instead of Windows Vista as the default operating system, type this command and press Enter:
bcdedit /default {ntldr} To change the display order of the multiboot menu, so that the Windows Vista entry appears first, and the Windows XP entry appears
second, type this command and press Enter: bcdedit /displayorder {current} {ntldr}
After you make your changes, they’ll take effect the next time you reboot.

0 comments:

Your Ad Here