"bcdedit /copy" 语法不正确。

13

我想在我的工作笔记本电脑上运行Oracle Virtual Box,但是出现了一个错误,说无法运行因为我正在运行Hyper-v。我试图按照Scott Hanselman的博客上的说明操作,这些说明在我个人笔记本电脑上遇到类似问题时曾经奏效。

我运行:

bcdedit /copy {current} /d "No Hyper V"
The copy command specified is not valid.
Run "bcdedit /?" for command line assistance.
The parameter is incorrect.

我运行

bcdedit /copy {current} /d /?

This command creates a copy of the specified boot entry.

bcdedit [/store <filename>] /copy {<id>} /d <description>

    <filename>      Specifies the store to be used. If this option is not
                    specified, the system store is used. For more information,
                    run "bcdedit /? store".

    <id>            Specifies the identifier of the entry to be copied.
                    For more information about identifiers, run
                    "bcdedit /? ID".

    <description>   Specifies the description to be applied to the new entry.

Example:

The following command creates a copy of the specified operating system boot
entry:

    bcdedit /copy {cbd971bf-b7b8-4885-951a-fa03044f5d71} /d "Copy of entry"
and
bcdedit /? ID

IDENTIFIERS

Many of the Bcdedit commands require identifiers. An identifier
uniquely identifies entries contained in the store. An identifier takes the
form of a globally unique identifier, or GUID. A GUID has the following format,
where each "x" represents a hexadecimal digit.

    {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}

For example:

    {d2b69192-8f14-11da-a31f-ea816ab185e9}

The position of the dashes (-) and the braces at the beginning and end of the
GUID are required.

Several entries can be identified by well-known identifiers. If an entry has a
well-known identifier, BCDedit displays it in output unless the /v command-line
switch is used. For more information, run "bcdedit /? /v".

The well-known identifiers are as follows:

    {bootmgr}               Specifies the Windows boot manager entry.

    {fwbootmgr}             Specifies the firmware boot manager entry,
                            specifically on systems that implement the
                            Extensible Firmware Interface (EFI) specification.

    {memdiag}               Specifies the memory diagnostic application entry.

    {ntldr}                 Specifies a OS loader (Ntldr) that can be used
                            to start operating systems earlier than Windows
                            Vista.

    {current}               Specifies a virtual identifier that corresponds to
                            the operating system boot entry for the operating
                            system that is currently running.

但是看起来我的语法没有问题,有人知道我哪里做错了吗?

4个回答

13

12

看起来问题出在Powershell上。我在Powershell提示符下输入了cmd,然后运行了bcdedit /copy {current} /d "No Hyper V",没有出现任何错误。


10
我曾经遇到过完全相同的问题。我在微软的bcdedit文档中找到了解决方案。这只是在使用powershell而不是cmd时出现的问题。
你只需要将引导项的标识符设置为双引号即可:
bcdedit /copy "{current}" /d "No Hyper-V"

0

当 shell/命令提示符未以管理员身份运行时,我遇到了同样的问题。

当未以管理员身份运行时,Windows 不允许对 BCD 进行任何读写操作。

> bcdedit /v
The boot configuration data store could not be opened.
Access is denied.

以管理员身份运行Shell或命令提示符解决了该问题。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接