Compartilhar via


WillWipeDisk

Applies To: Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Vista

WillWipeDisk specifies whether to erase all partitions and data on the hard disk before adding additional configurations to the disk.

WillWipeDisk is blocked in the Windows® Preinstallation Environment (Windows PE) if any of the following conditions are true:

  • Windows Setup binaries are running from the disk in question.

  • The currently running operating system is booted from the disk in question. If the currently running operating system is booted from a RAM drive, WillWipeDisk is not affected.

  • There is an active page file on the disk in question.

Values

true

Specifies that the disk is erased.

false

Specifies that the disk is not erased.

Valid Configuration Passes

windowsPE

Parent Hierarchy

Microsoft-Windows-Setup | DiskConfiguration | Disk | WillWipeDisk

Applies To

For a list of supported Windows editions and architectures that this component supports, see Microsoft-Windows-Setup.

XML Example

The following XML output for the DiskConfiguration setting shows how to erase all partitions and data on a hard disk, and then create two new partitions.

<DiskConfiguration>

  <Disk wcm:action="add">
    <DiskID>0</DiskID> 
    <WillWipeDisk>true</WillWipeDisk> 
    <CreatePartitions>

      <!-- System partition -->
      <CreatePartition wcm:action="add">
        <Order>1</Order> 
        <Type>Primary</Type> 
        <Size>300</Size> 
      </CreatePartition>

      <!-- Windows partition -->
      <CreatePartition wcm:action="add">
        <Order>2</Order> 
        <Type>Primary</Type> 
        <Extend>true</Extend> 
      </CreatePartition>

    </CreatePartitions>
    <ModifyPartitions>

      <!-- System partition -->
      <ModifyPartition wcm:action="add">
        <Order>1</Order> 
        <PartitionID>1</PartitionID> 
        <Label>System</Label> 
        <Format>NTFS</Format> 
        <Active>true</Active> 
      </ModifyPartition>

      <!-- Windows partition -->
      <ModifyPartition wcm:action="add">
        <Order>2</Order> 
        <PartitionID>2</PartitionID> 
        <Label>Windows</Label> 
        <Letter>C</Letter> 
        <Format>NTFS</Format> 
      </ModifyPartition>
    </ModifyPartitions>
  </Disk>

  <WillShowUI>OnError</WillShowUI> 
</DiskConfiguration>


<ImageInstall>
  <OSImage>
    <InstallTo>
      <DiskID>0</DiskID> 
      <PartitionID>2</PartitionID> 
    </InstallTo>
  </OSImage>
</ImageInstall>

For full XML examples and recommended partition configurations, see How to Configure UEFI/GPT-Based Hard Disk Partitions or How to Configure BIOS/MBR-Based Hard Disk Partitions.

See Also

Concepts

Disk
Format