Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Windows 7 - BCDEDIT Command Line Tool

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 13-04-2009
Member
 
Join Date: Apr 2009
Posts: 732
Windows 7 - BCDEDIT Command Line Tool
  

I heard this line many times in last few days 'BCDEDIT Command Line Tool in Windows 7'. I am also a windows 7 user. People said its related to some boot loader entries.

I wanted to know what is that actually and how to use that ?

Reply With Quote
  #2  
Old 13-04-2009
Member
 
Join Date: May 2008
Posts: 2,290
Re: Windows 7 - BCDEDIT Command Line Tool

Bcdedit is a really powerful tool that Windows Vista and Windows 7 uses to manage the boot loader entries.If you want your system to boot, Bcdedit needs boot loader file. As far as boot loader is concerned, it is a file that instructs the system to resume an operating system.A boot loader is a file that contains necessary information that instruct the system how to boot/start an operating system.

\bootmgr is the file for Windows 7 and Windows Vista bootloader. Whereas, \ntldr is the file for Windows XP. BCDEDIT can support other bootloaders too, like grub for linux. You just have to place the bootloader file on the root of the boot manager partition. e.g. \grldr and you have a grub boot loader enabled.

This is how you have to situate the bootloader file on the boot manager partition. Now the grub bootloader is enabled.\boot\bcd this is the hidden partition of Windows 7 where the Bcdedit edited file bcd is located. But in Windows Vista, it is located as C:\boot\bcd.

Now lets see how to use BCDEDIT Command Line Tool:-

1. Open an elevated command prompt.

2. Type bcdedit and press enter. By typing just bcdedit you just list your boot entries.

Now your boot entry is done which includes 4 elements:
1. Identifier-The identifier is how the system has named the boot entry.
2. Device-The device is the drive or virtual image that the system will use to boot the boot entry.
3. Path-The path is the location on the device where the bootloader file is found.
4. Description-The description is the friendly name we give to our boot entry, e.g. "Windows 7"

Next to identifiers are the UUIDs inside{ } which are the codenames given by the system to every boot entry that are unchangeable.The standard identifier UUIDs are explained below:
  • {bootmgr} = the boot manager
  • {current} = the OS you selected to boot at startup.
  • {default} = the default OS selected to boot the PC.
  • {ntldr} = Windows Legacy OS Loader (for windows xp)
    There are others like {memdiag} or {ramdisk} but they can't be of much use right now.

Now to see how we can control the above entries, here are some examples:
  • bcdedit /set {current} description "My edited Windows Boot Entry". This changes the title of the boot menu entry "{current}".
  • bcdedit /set {ntldr} device partition=E:This tells bcd that Windows XP partition is drive E:
  • bcdedit /set {ntldr} path \ntldr. This tells bcd that the ntldr file which is the winxp bootloader is on root folder "\" (of drive e: as stated above)
  • bcdedit /displayorder {ntldr} /addfirst. This places Windows XP as the first OS on the menu list.
  • bcdedit /default {ntldr}. This places Windows XP as the default OS to boot first with.
  • bcdedit /displayorder {33342343-3424-2342342342-2344} /addlast. This tells bcd that the boot entry with UUID 3334... should be the last entry on the menu.
Reply With Quote
  #3  
Old 13-04-2009
Member
 
Join Date: May 2008
Posts: 2,382
Re: Windows 7 - BCDEDIT Command Line Tool

You can copy your existing VISTA or W7 boot entry to another identical. Then you can change settings on the new entry to experiment. You will always have the first entry available, so it's safe to play with.
  • bcdedit /copy {current} /d "New W7 boot entry I just copied!"
  • this will give you a line: The entry was successfully copied to {4c21825f-e04b-11dd-b760-00195b61617a}. The {4c21825f-e04b-11dd-b760-00195b61617a} is the UUID of the new entry that the system just created. Yours will be different than mine!
  • bcdedit /set {4c21825f-e04b-11dd-b760-00195b61617a} numpoc 2. This adds the 2 CPU Core support during boot, like you do in msconfig.
  • bcdedit /deletevalue {4c21825f-e04b-11dd-b760-00195b61617a} numproc. This deletes the numproc parameter from entry {4c21825f....}
  • bcdedit /delete {4c21825f-e04b-11dd-b760-00195b61617a}. This deletes the boot entry {4c21825f....} completely. In order to delete an {ntldr} entry, you must use the /f switch to force deletion: bcdedit /delete {ntldr} /f

You can always type just bcdedit to see your current settings.
Reply With Quote
  #4  
Old 13-04-2009
Member
 
Join Date: Jan 2008
Posts: 1,515
Re: Windows 7 - BCDEDIT Command Line Tool

Easy bcd and VistaBootPro are very handy for many things, tho. it is good for people to have some bcdedit knowledge - particularly if they need to use the boot dvd.

You must be logged on in an administrator account to be able to do this tutorial.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Windows 7 - BCDEDIT Command Line Tool"
Thread Thread Starter Forum Replies Last Post
xcopy command line together with wmplayer command line Aislinn Operating Systems 5 31-03-2010 12:13 PM
Can Windows Update be run from the command line? Xena Networking & Security 4 24-07-2009 05:10 PM
How to reboot Windows XP from command line robin45 Operating Systems 3 24-07-2009 05:03 PM
Command line tool to convert VC project files to Makefile Harman Software Development 3 25-10-2008 05:19 PM
DSRM.exe Active Directory command line tool Joe Windows Server Help 2 10-03-2006 06:50 PM


All times are GMT +5.5. The time now is 11:59 PM.