Welcome Guest ( Log In | Register )

Bump Topic Topic Closed RSS Feed

Outline · [ Standard ] · Linear+

 Modify the bootloader for Vista, BCDEDIT.exe

views
     
SUSkockroach
post May 30 2007, 11:43 AM, updated 19y ago

Certified Noob
*******
Senior Member
3,256 posts

Joined: Dec 2006
From: Mars not Venus Status: In a Relationship


QUOTE
1. Renaming an entry in the boot menu

2. Setting the entry that will boot by default

3. Removing an entry from the boot menu

4. Changing the default timeout from 30 secs to something shorter

First things first, this is a tool which requires an elevated set of privileges in order to function. The simplest way to achieve this on Vista is to create a shortcut to your command prompt on your desktop or Quick Launch bar and right click it and select "run as administrator".

Having run our admin command prompt the next thing to do is to find out what entries we currently have in our BCD store we do this by entering

bcdedit /enum

This will show us an entry for the "Windows Boot Manager" an entry for the Vista installation marked "Windows Boot Loader" and an entry marked "Windows Legacy OS Loader" for our *legacy* operating system. (In my case XP)

Each of these entries will have an identifier in curly braces {bootmgr}, {ntldr} and {current} respectively for the well known entries. Any other entries will also have an identifier, but these will be guids such as {80C0F73A-C32E-4CC2-8D0A-2D65BA731891} - yours will be different.

In fact each of the well known entries also has a guid, to see these you need to add the /v (for verbose) switch to the command line

bcdedit /enum /v

In order to manipulate the entries we need to reference each of them and for this purpose you can use either the well known identifier, where available, or the guid - it is entirely up to you.

So - to rename an entry we need to change the description, for that we use the set command

bcdedit /set {ntldr} description "Microsoft Windows XP"

or

bcdedit /set {158E15AB-5165-4FBE-8D37-9D49C75738DD} description "Microsoft Windows XP" **

** N.B. The guid can also be used in each of the following commands if preferred or necessary. If you are going to use the guid it is probably a good idea to block copy it from an enum listing.

To set the entry that will boot by default we use the default keyword

bcdedit /default {ntldr}

To set the timeout to a different value, we use the timeout keyword and the number of seconds

bcdedit /timeout 5

To be clear - This means if no key has been pressed in 5 seconds load the default OS.

To delete an entry for example if you have RC1 and RC2 installed and you wish to remove one of them, we use the delete keyword

bcdedit /delete {E2814133-E76D-4445-906B-B9E2509F1D95} /cleanup

The /cleanup switch also ensures that the entry is removed from the boot menu as well as the Store.

Important: If you wish to remove a well know entry you need to add the /f (force) switch otherwise nothing will happen.

bcdedit /delete {current} /f

As discussed earlier bcdedit has quite a few more tricks up its sleeve which you can examine by entering the following

bcdedit /?

You can also find out more about a particular command by adding it to the end of the previous line, e.g. if you can't remember the syntax for delete

bcdedit /? delete

So, to sum up, a fairly trivial thing but if you tend to multitask and do other things whilst your computer is booting, you don't need to come back and find it has booted the wrong OS many times before it becomes annoying.

I will see if I can drum up something a little more technical for next time.


Sources 4 Chaps From Blighty

Further information http://www.flexbeta.net/forums/index.php?showtopic=8373

Topic ClosedOptions
 

Change to:
| Lo-Fi Version
0.0131sec    1.22    5 queries    GZIP Disabled
Time is now: 19th December 2025 - 12:31 PM