无法删除 diskpart 中的分区 - 无效参数?

Sam*_*mir 5 windows hard-drive command-line partitioning usb-flash-drive

我正在尝试使用 Diskpart 删除 UFD 上的分区。我正在通过提升的 CMD 提示运行它。但问题是它报告我使用了无效的参数。请查看下面的日志。

Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>diskpart

Microsoft DiskPart version 6.3.9600

Copyright (C) 1999-2013 Microsoft Corporation.
On computer: SKANNING24

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          465 GB  1024 KB        *
  Disk 1    Online         3819 MB  3670 MB        *

DISKPART> select disk 1

Disk 1 is now the selected disk.

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Primary             49 MB    64 KB
  Partition 2    System              98 MB    51 MB

DISKPART> select partition 1

Partition 1 is now the selected partition.

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
* Partition 1    Primary             49 MB    64 KB
  Partition 2    System              98 MB    51 MB

DISKPART> delete

Microsoft DiskPart version 6.3.9600

DISK        - Delete a missing disk from the disk list.
PARTITION   - Delete the selected partition.
VOLUME      - Delete the selected volume.

DISKPART> delete partition 1

The arguments specified for this command are not valid.
For more information on the command type: HELP DELETE PARTITION

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
* Partition 1    Primary             49 MB    64 KB
  Partition 2    System              98 MB    51 MB

DISKPART> select partition 2

Partition 2 is now the selected partition.

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Primary             49 MB    64 KB
* Partition 2    System              98 MB    51 MB

DISKPART> delete partition 2

The arguments specified for this command are not valid.
For more information on the command type: HELP DELETE PARTITION

DISKPART> help delete partition

    Deletes the partition with focus.

Syntax:  DELETE PARTITION [NOERR] [OVERRIDE]

    NOERR       For scripting only. When an error is encountered, DiskPart
                continues to process commands as if the error did not occur.
                Without the NOERR parameter, an error causes DiskPart to exit
                with an error code.

    OVERRIDE    Enables DiskPart to delete any partition regardless of type.
                Typically, DiskPart only permits you to delete known data
                partitions.

    You cannot delete the system partition, boot partition, or any partition
    that contains the active paging file or crash dump (memory dump) filed.

    A partition must be selected for this operation to succeed.

    Partitions cannot be deleted from dynamic disks or created on dynamic
    disks.

Example:

    DELETE PARTITION

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Primary             49 MB    64 KB
* Partition 2    System              98 MB    51 MB

DISKPART> delete partition 2 override

The arguments specified for this command are not valid.
For more information on the command type: HELP DELETE PARTITION

DISKPART>
Run Code Online (Sandbox Code Playgroud)

问:本案中的“论据”是什么?为什么它无效?

这不是我第一次使用 Diskpart,我曾经多次使用过它,每当磁盘驱动器上有特殊的隐藏恢复分区无法使用 Diskmgmt.msc 等传统磁盘工具删除时。所以我很确定我的语法是正确的,我正在根据帮助页面做所有事情。

我在 Windows 8.1 上工作,UFD 是全新的 SanDisk Cruzer Blade 4 GB。我只安装了 PassMark Memtest86,这就是我使用它的全部目的。我今天格式化了 UFD 以从中删除 Memtest86(在资源管理器中快速格式化),但在 UFD 上留下了一个隐藏的 EFI 分区。请参阅下面的屏幕截图。

一种

Sam*_*mir 7

无效的论点!我现在明白了。

当分区已被选中时,无需在命令后附加分区号。

代替:

select partition 2
delete partition 2 override
Run Code Online (Sandbox Code Playgroud)

用这个:

select partition 2
delete partition override
Run Code Online (Sandbox Code Playgroud)

就如此容易...

Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. Med ensamrätt.

C:\Windows\system32>diskpart

Microsoft DiskPart version 6.2.9200

Copyright (C) 1999-2012 Microsoft Corporation.
On computer: SKANNING26

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          698 GB      0 B        *
  Disk 1    Online         3819 MB  3670 MB        *

DISKPART> select disk 1

Disk 1 is now the selected disk.

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Primary             49 MB    64 KB
  Partition 2    System              98 MB    51 MB

DISKPART> select partition 1

Partition 1 is now the selected partition.

DISKPART> delete partition 1

The arguments specified for this command are not valid.
For more information on the command type: HELP DELETE PARTITION

DISKPART> delete partition

DiskPart successfully deleted the selected partition.

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 2    System              98 MB    51 MB

DISKPART> select partition 2

Partition 2 is now the selected partition.

DISKPART> delete partition

Virtual Disk Service error:
Det går inte att ta bort en skyddad partition utan att parametern Tvinga skyddad
 har angetts.


DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
* Partition 2    System              98 MB    51 MB

DISKPART> delete partition override

DiskPart successfully deleted the selected partition.

DISKPART> list partition

There are no partitions on this disk to show.

DISKPART>
Run Code Online (Sandbox Code Playgroud)

一种