Recently, due to work testing needs, multiple operating systems (XP, VISTA, WIN7) have been installed on one computer ), however, window7 only displays startup options such as "previous versions of the system" and needs to be modified to facilitate access to the desired system. However, it is found that C:/boot. ini cannot be directly modified in Windows 7, as in Windows XP. You must use the bcdedit command as an administrator. The record is as follows:
Bcdedit
Directory
Bcdedit Introduction
Notes before using BCDEdit
Use BCDEdit to modify the menu options
Change System name
Bcdedit Introduction
In the NT60 Operating System (Windows 7/Vista/2008), a command line tool is used to create and reconfigure bootloader, which does not need to use the boot. ini file. That is to say, the BCDEdit tool can be used to modify the Startup menu of NT60 series systems.
In the previous Windows System Based on NT50 series (Windows XP/2000/2003), Windows used Ntldr as the Boot Loader to start the system, but in the new NT60 series system, microsoft introduced a new boot loader architecture, Windows Boot Manager (Bootmgr.exe ). Unlike Ntldr, which relies heavily on hardware, the new architecture in NT60 enables complete hardware independence and can be seamlessly integrated with multiple operating systems, this makes the startup/boot process of NT60 faster and safer. In addition. the content managed by ini is handed over to the new Boot Configuration Data (BCD: startup setting Data). Of course, the new startup option editing tool BCDEdit (BCDEdit.exe) is also provided to manage startup settings.
-- The so-called boot loader refers to a small program executed before the kernel runs. The system uses it to initialize hardware devices and build a memory space ing diagram, set the system's hardware and software environment to an appropriate state, and prepare the correct environment for the final call to the operating system kernel. -- Ntldr uses Boot during startup. the ini file is used to determine the operating system options to be displayed during startup/boot. You can modify the boot options by modifying the settings. the content of the INI file is implemented. Comparison between Windows NT60 (Windows 7/Vista/2008) and earlier NT52 series (Windows XP/2000/2003) boot in traditional BIOS-based computers, if you only install the NT60 Operating System (Windows 7/Vista/2008), you will find the Boot. the ini file has been completely removed from the system. If NT60 and the previous Windows systems such as NT52 operating systems (Windows XP/2000/2003) are installed in the system, you can still find the Boot. ini file. However, this file only applies to those systems and does not affect NT60 startup.
However, in Computers Based on EFI (Extensible Firmware Interface: Extensible Firmware Interface, more and more PCs will use this Interface in the future), Boot. ini files no longer exist. In EFI-based systems, startup options are stored in the memory of the motherboard. In this case, you must modify the startup options, either by using tools that can read and write NVRAM, such as NvrBoot, or by using the BCDEdit mentioned above.
As you can see, in NT60, you want to use a simple text editor to modify Boot as in NT52. it is no longer possible to manage the startup options by using ini (or using the Bootcfg tool provided by NT52). To modify the startup settings, you can only use BCDEdit, which is much more complex in the command format.
In addition, Microsoft provides the BCD class that can be called Through WMI (Windows Management Instrumentation: Windows Management Specification) in NT60, through which BCD data can be modified programmatically. However, I believe this is even more impossible for the vast majority of users who do not have access to programming.
Notes before using BCDEdit
1. tool nature
Then, bcdeditis not a program running on the graphic interface, but a command line tool. The file (bcdedit.exe) is located in the \ Windows \ System 32 directory.
2. Start
To execute BCDEdit, you must first enter the command line window and escalate the user to administrator privileges. In addition, the tool depends on parameters. If no parameter is included, the tool cannot be used normally.
In the command line window, go to the system directory, such as "C:/windows/system32", and enter "bcdedit <parameter>. It can also be run directly in any directory because the System32 directory is within the range of the environment variable "Path.
3. BCDEdit command Core
(1) Help
Bcdedit /? : Displays all command help (all are just an overview ).
Bcdedit.exe /? <Command>: displays detailed information about the specified command parameters (without a slash ). Other available parameters can also be viewed in the command format.
(2) Enum
With the command line tool Bcdedit, we can add, delete, and modify objects in the BCD (Boot Configuration Data. In BCD, each object has a Unique GUID (Globally Unique Identifier: Globally Unique Identifier), such as the GUID of each hard disk in the system and each partition (Globally Unique Identifier.
In BCD, The GUID of a hard disk or partition can be divided into the following categories:
{Ntldr}: hard disk or partition with the previous generation of NT50 operating systems (Windows XP/2000/2003;
{Default}: the default disk or partition;
{Current}: current hard disk or partition;
{<GUID >}: similar to the GUID in this format, it refers to other hard disks or partitions installed with the operating system.
(Note: The GUID can be viewed using the "bcdedit" or "bcdedit/enum all" command. This will display the current BCD startup settings data, including all the operating systems in the BCD record, all of which can display their guids. You can refer to this for changing the startup data .)
(3) insurance measures (use BCDEdit backup and recovery startup options)
Before you modify the Windows NT60 startup options, you are advised to back up the settings to prevent system startup from being caused by misoperations or other faults.
Bcdedit/export <directory>: Back up startup settings to the specified directory;
Bcdedit/import <directory>: select the start option for the backup under the specified directory before the backup is restored.
Note: When you need to restore the backup startup options, you should carefully check whether the backup startup options correspond to what you need. Otherwise, resetting will be troublesome.
Use BCDEdit to modify the menu options
As a good operation habit, you must back up the startup options in BCD before making any modifications to the Windows Vista startup options. We have already introduced the corresponding commands on the page, next, use "bcdedit" or "bcdedit/enum all" to view and record the correct GUID of the hard disk or partition in the system. After all, BCDEdit is just a command line tool. When you manually enter a long string such as "", it is easy to make an error, which often causes Windows Vista to fail to start.
The following describes how to use BCDEdit to modify the common command format of startup options:
Bcdedit/set {ntldr} Description "Windows XP Professional SP2": modifies the display content of the previous generation in the Startup menu, for example, we can also change it to "XP SP2 dedicated for Vista world de. Note: The quotation marks in the command cannot be omitted; Operating System
Bcdedit/set {current} description "Windows Vista Build 5270 x86": modify the content displayed in the boot menu of the operating system on the hard drive or partition currently started. Note: The operating system on the current partition may be Windows Vista or another system. Of course, the quotation marks in the command cannot be omitted;
Bcdedit/set {<GUID >}description "Windows Vista Build 5270 x64": Modify the display content of the system installed on another hard disk or partition in the boot menu, when using this command, make sure that the GUID of the hard disk/partition is entered correctly. You can view the GUID by running the "bcdedit" or "bcdedit/enum all" command.
Bcdedit/default {current}: Set the operating system in the hard drive/partition to the default system;
Bcdedit/default {<GUID >}: set the operating system on the specified GUID as the default system;
Bcdedit/default {ntldr}: Set Windows XP as the default startup system of the previous generation;
Bcdedit/displayorder: Set the display sequence of each item in the Enable menu, for example:
Bcdedit.exe/displayorder {ntldr} {current}: Windows XP is displayed first, and then Windows Vista is started by default;
Bcdedit/timeout 15: Change the default start menu display time to 30 seconds to 15 seconds. Of course, you can change this time to any expected value.
Use BCDEdit to fix Hard Disk/partition structure errors
During the modification of the startup option, such as adding or deleting a hard disk/partition, the hard disk/partition structure may be disordered due to carelessness in the operation, in addition to restoring the backup method before modification, you can also use BCDEdit to try the restoration.
The specific method is as follows:
X: \> X: \ boot \ fixntfs.exe-lh-all: "X:" indicates the hard disk/partition of the boot directory;
Bcdedit/set device partition = X: set the partition of the specified GUID as the startup partition. Note that the GUID of "X:" must be different from the specified value. After running this command, you must run the following osdevice command;
Bcdedit/set osdevice partition = X: set the partition of the specified GUID as the startup partition. Note: This command must be paired with the above device command, and the GUID of "X:" must be different from the specified value.
Bcdedit command details, custom Vista startup management items
Bcdedit is located on X: \ Windows \ system32 \ "X:" is the drive letter for Vista installation.
Storage operation commands
================================
/Createstore creates a new blank STARTUP configuration data file.
Bcdedit/createstore C: \ Data \ BCD create a bcd startup configuration DATA file and store it in the "C: \ Data \" folder.
/Export backup start configuration data file.
Bcdedit/export "C: \ Data \ BCD Backup" back up the bcd startup configuration file to the "C: \ Data \" folder and name it "BCD Backup.
/Import to restore the startup configuration data file.
Bcdedit/import "C: \ Data \ BCD Backup" restores the bcd startup configuration file from the "C: \ Data \" folder.
Operation instructions for storage projects
================================
/Copy project copy
Copy of OS startup items:
Bcdedit/copy/d "Copy of entry"
/Create a project
Create the NTLDR (Ntldr) of the operating system loader project ):
Bcdedit/create/d "Earlier Windows OS Loader"
Create another item for the storage disk:
Bcdedit/create/d "Ramdisk options"
Create a new operating system startup project:
Bcdedit/create/d "Windows Vista"/application osloader
Create a new Debugger:
Bcdedit/create/d "Debugger Settings"
/Delete a project
Delete a specified operating system project:
Bcdedit/delete
Delete the specified operating system project but do not display the project at startup (delete permanently ):
Bcdedit/delete/cleanup
Delete the specified operating system project, but the project is displayed at startup:
Bcdedit/delete/nocleanup
Delete the NTLDR of the operating system loader project:
Bcdedit/delete/f
Project selection operation instructions
================================
/Deletevalue Delete the selected item.
Delete the bootmgr selection item of startup management:
Bcdedit/deletevalue bootsequence
Delete the numeric boot item of the (WinPE) Operating System:
Bcdedit/deletevalue winpe
Delete the Windows PE numeric system boot item from the specified operation:
Bcdedit/deletevalue winpe
/Set to set the value of the selected item.
Set the operating system cbd971bf-b7b8-4885-951a-fa03044f5d71 boot partition C ":
Bcdedit/set device partition = C:
The specified operating system boot file "windows \ system 32 \ winload.exe ":
Bcdedit/set path \ windows \ system32 \ winload.exe
Set "NX" to "OptIn ":
Bcdedit/set nx optin
Change System name
The default XP system name is "earlier version of Windows" in the Vista startup manager. Change the name:
Bcdedit/set Description "Windows XP Professional SP2"
The default Vista system name is "Microsoft Windows" in the Vista startup manager. Change:
Bcdedit/set Description "Windows Vista 5456"
Output Control commands
================================
/List items of enum in storage.
List all operating system loader startup projects:
Bcdedit/enum OSLOADER
List all startup management projects:
Bcdedit/enum BOOTMGR
List default startup items:
Bcdedit/enum
List the specified operating system startup project:
Bcdedit/enum
/V list all activities
Bcdedit/enum ACTIVE/v
Start management control commands
================================
/Bootsequence: Set the sequence of the startup list.
Set two operating system projects and startup sequence:
Bcdedit/bootsequence {cbd971bf-b7b8-4885-951a-fa03044f5d71}
Add an operating system project as the last entry in the startup list:
Bcdedit/bootsequence/addlast
/Default: sets the default startup project.
Set the default startup project:
Bcdedit/default
Set the default Operating System Program to NTLDR:
Bcdedit/default
/Displayorder indicates which system is started to display the multi-Start Screen.
Set two operating system projects and the program NTLDR loaded by the operating system in the startup management display command:
Bcdedit/displayorder
Add the specified operating system project to the startup management. The command ends:
Bcdedit/displayorder/addlast
/Timeout: Set the pause value.
/Toolsdisplayorder specifies the startup management display tool screen of the command.
Set two tool projects and memory diagnostics to start the management tool display command:
Bcdedit/toolsdisplayorder
Add the specified tool project to the startup end management tool display command:
Bcdedit/toolsdisplayorder/addlast
Command to control the emergency processing service for an application
================================
/Bootems
Enable the Emergency Management Service:
Bcdedit/bootems ON
/EMS
Enable EMS for the current operating system startup project:
Bcdedit/EMS ON
/Emssettings sets the parameters of the emergency processing service.
Set EMS parameters to use basic output to system settings:
Bcdedit/emsset1_bios