The <DiskConfig> Element

The <DiskConfig> Element

The <DiskConfig> element is required in every answer file. <DiskConfig> can contain the following elements. For more details about the individual elements, click its name in the list below.

Element Description
Disk Specifies information about disk configuration. This element is required.
CreatePartition Specifies information about creating a new partition. Either this element or ModifyPartition is required.
ModifyPartition Specifies information about modifying an existing partition. Either this element or CreatePartition is required.

Sample <DiskConfig> Elements

  <DiskConfig>
   <!--This element contains information for prepopulating disk configuration settings-->
   <Disk ID="0" WipeDisk="Yes">
      <CreatePartition Label="Windows Partition" Size="3000" Letter="C" FileSystem="NTFS" AllocationUnit="1024" QuickFormat="Yes" FileCompression="Yes" />
   </Disk>
</DiskConfig>

—or—

  <DiskConfig>
   <!--This section contains elements for pre-populating information about disk configuration settings-->
   <Disk ID="0" WipeDisk="Yes">
      <ModifyPartition ID="1" Label="System Partition" Letter="X" FileSystem="NTFS" AllocationUnit="1024" QuickFormat="Yes" FileCompression="Yes" />
   </Disk>
</DiskConfig>

Back to top

The <Disk> Element

Syntax:

  
    <Disk ID=“ID_Value” WipeDisk=“
    Yes|No
    ” />
  

ID_Value is the identification of the disk that is to be configured. This value must be an integer value of 0 or above.

WipeDisk="Yes" allows Setup to modify non-empty space on a disk. WipeDisk="No" prevents Setup from modifying non-empty space on a disk.

If WipeDisk is not specified and the <CreatePartition> element is specified, Setup checks to see if the target disk has unallocated space. If the disk has unallocated space, Setup creates partitions as specified in the <CreatePartition> element, starting on the first available contiguous unallocated space on the disk.

If WipeDisk="No" and the <CreatePartition> element is missing AND the <ModifyPartition> element is present, Setup will start modifying the partitions specified.

If WipeDisk="Yes" and the <CreatePartition> element has no attributes, Setup will wipe the disk and create a single partition for the product to be installed on.

Example:

  <Disk ID=“O” WipeDisk=“Yes” >
    <CreatePartition />
</Disk>

Back to top

The <CreatePartition> Element

Syntax:

  
    <CreatePartition Label="
    Partition_Name
    ” Size="
    Size_in_MBs
    ” Letter="
    Partition_Letter
    ” FileSystem=“
    File_System_Type
    ” AllocationUnit="
    AllocationUnit_Integer
    ” QuickFormat=“
    Yes|No
    ” FileCompression =“
    Yes|No
    ” />
  

Partition_Name is the name of the partition. The name can contain any character except the asterisk, the single quote, and the double quote. To specify the default name (“New Volume {0}” where {0} is the first unused number), use the “*” (asterisk) character.

Size_in_MBs is the size of the partition in megabytes. This must be a positive number. To specify the default size, use the “*” (asterisk) character. The default size is the largest Freespace available. If the WipeDisk attribute of the <Disk> element =”Yes”, WEPOS will wipe the disk and use the whole disk.

Partition_Letter is the drive letter assigned to a particular partition. It is a letter "C-Z". This can be uppercase or lowercase. To specify the default drive (C:), use the “*” (asterisk) character.

File_System_Type is the type of file system the partition will be formatted with. There are two options: FAT32 and NTFS. The default is NTFS.

AllocationUnit_Integer is the allocation unit size used to create the partition. To specify the default size, use the “*” (asterisk) character.

There are four size options for the file system type NTFS:

  • 512 (default if Size is set to 512 MB or less)
  • 1024 (default if Size is set to 1 GB or less, but more than 512 MB)
  • 2048 (default if Size is set to 2 GB or less, but more than 1 GB)
  • 4096 (default if Size is set to more than 2 GB)

There are six size options for file system type FAT32:

  • 512 (default if Size is set to 64 MB or less)
  • 1024 (default if Size is set to 128 MB or less, but more than 64 MB)
  • 2048 (default if Size is set to 256 MB or less, but more than 128 MB)
  • 4096 (default if Size is set to 8 GB or less, but more than 256 MB)
  • 8192 (default if Size is set to 16 GB or less, but more than 8 GB)
  • 16K (default if Size is set to 32 GB or less, but more than 16 GB)

QuickFormat="Yes" does a quick format, removing files from the volume without checking for bad sectors using the chkdsk command. QuickFormat="No" will check for bad sectors before formatting.

FileCompression="Yes" turns on file compression. FileCompression="No" does not. File compression should be used only when disk space is scarce, because file compression will slow down the device. File compression cannot be used for FAT32.

Example:

  <CreatePartition Label=“Windows Partition” Size=“3000” Letter=“C” Format=“Yes” FileSystem =“NTFS” AllocationUnit=“1024” QuickFormat=“Yes” FileCompression =“Yes” />

Back to top

The <ModifyPartition> Element

Syntax:

  
    <ModifyPartition ID="
    ID_Value
    " Label="
    Partition_Name
    " Letter="
    Partition_Letter
    " FileSystem=“
    File_System_Type
    ” AllocationUnit="
    Integer
    ” QuickFormat=“
    Yes|No
    ” FileCompression=“
    Yes|No
    />
  

ID_Value is the ID of the partition that will be modified. This value must be an integer value of 0 or above.

Partition_Name is the name of the partition. The name can contain any character except the asterisk, the single quote, and the double quote.

Partition_Letter is the drive letter assigned to the partition to be modified. The characters C-Z are allowed, in uppercase or lowercase letters.

File_System_Type is the type of file system the partition will be formatted with. There are two options: FAT32 and NTFS.

Integer is the allocation unit size used to create the partition. There are eight options:

  • 512
  • 1024
  • 2048
  • 4096
  • 8192
  • 16K
  • 32K
  • 64K

QuickFormat="Yes" does a quick format, removing files from the volume without checking for bad sectors using the chkdsk command. QuickFormat="No" will check for bad sectors before formatting.

FileCompression="Yes" turns on file compression. FileCompression="No" does not. File compression should be used only when disk space is scarce, because file compression will slow down the device. File compression cannot be used for FAT32.

Example:

  <ModifyPartition ID="1" Label="System Partition" Letter="X" FileSystem="NTFS" AllocationUnit="1024" QuickFormat="Yes" FileCompression="Yes" />

Back to top

© 2005 Microsoft Corporation. All rights reserved.