WDS Answer File to Create Partition Size of HDD

Hi,

I have an unattended answer file that I would like to edit.  My answer file is working fine but I received an error today because it was trying to create a partition bigger than the capacity of the drive.  I need to edit the below so that it creates the windows installation partition to the full size of the drive regardless of how big it may be.

<DiskConfiguration>
                <WillShowUI>OnError</WillShowUI>
                <Disk>
                    <DiskID>0</DiskID>
                    <WillWipeDisk>true</WillWipeDisk>
                    <CreatePartitions>
                        <CreatePartition>
                            <!-- Create the system partition -->
                            <Order>1</Order>
                            <Type>Primary</Type>
                            <Size>100</Size>
                        </CreatePartition>
                        <!-- Create the Windows partition -->
                        <CreatePartition>
                            <Order>2</Order>
                            <Type>Primary</Type>
                            <Size>90000</Size>
                        </CreatePartition>
                    </CreatePartitions>
                    <ModifyPartitions>
                        <!-- Modify the system partition -->
                        <ModifyPartition>
                            <Order>2</Order>
                            <PartitionID>1</PartitionID>
                            <Format>NTFS</Format>
                            <Label>System</Label>
                            <Active>true</Active>
                        </ModifyPartition>
                        <!-- Modify the Windows partition -->
                        <ModifyPartition>
                            <Order>1</Order>
                            <PartitionID>2</PartitionID>
                            <Format>NTFS</Format>
                            <Label>Windows</Label>
                            <Letter>C</Letter>
                        </ModifyPartition>
                    </ModifyPartitions>
                </Disk>
            </DiskConfiguration>


Thank you
LVL 1
hyperbyteAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

footechCommented:
In the CreatePartition (order 2), instead of specifying a size, add the "extend" setting with a value of true.  Here's an example of what the CreatePartitions section would look like (taken from one of my own files).
                    <CreatePartitions>
                        <CreatePartition wcm:action="add">
                            <Order>1</Order>
                            <Size>200</Size>
                            <Type>Primary</Type>
                        </CreatePartition>
                        <CreatePartition wcm:action="add">
                            <Order>2</Order>
                            <Extend>true</Extend>
                            <Type>Primary</Type>
                        </CreatePartition>
                    </CreatePartitions>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
hyperbyteAuthor Commented:
Thank you for the response.

Do you mean like this:

<DiskConfiguration>
                <WillShowUI>OnError</WillShowUI>
                <Disk>
                    <DiskID>0</DiskID>
                    <WillWipeDisk>true</WillWipeDisk>
                    <CreatePartitions>
                        <CreatePartition>
                            <!-- Create the system partition -->
                            <Order>1</Order>
                            <Type>Primary</Type>
                            <Size>100</Size>
                        </CreatePartition>
                        <!-- Create the Windows partition -->
                        <CreatePartition>
                            <Order>2</Order>
                            <Type>Primary</Type>
                            <Extend>True</Extend>
                        </CreatePartition>
                    </CreatePartitions>
                    <ModifyPartitions>
                        <!-- Modify the system partition -->
                        <ModifyPartition>
                            <Order>2</Order>
                            <PartitionID>1</PartitionID>
                            <Format>NTFS</Format>
                            <Label>System</Label>
                            <Active>true</Active>
                        </ModifyPartition>
                        <!-- Modify the Windows partition -->
                        <ModifyPartition>
                            <Order>1</Order>
                            <PartitionID>2</PartitionID>
                            <Format>NTFS</Format>
                            <Label>Windows</Label>
                            <Letter>C</Letter>
                        </ModifyPartition>
                    </ModifyPartitions>
                </Disk>
            </DiskConfiguration>
0
footechCommented:
Yes.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2008

From novice to tech pro — start learning today.