Jump to content

Windows 7 Unattended DiskConfiguration


Recommended Posts

Hello,

I could cry :/ I tried to unattended my windows setup but at the part where it should partition my harddisk it shows me the harddisk with unallocated space.

My unattened setup should create 3 partitions (1. System Reserved, 2. System (Win+Programs), 3. Data).

Can any1 help me find my mistake.

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<UserData>
<AcceptEula>true</AcceptEula>
</UserData>
<DiskConfiguration>
<Disk wcm:action="add">
<CreatePartitions>
<CreatePartition wcm:action="add">
<Order>1</Order>
<Size>200</Size>
<Type>Primary</Type>
</CreatePartition>
<CreatePartition wcm:action="add">
<Size>20480</Size>
<Order>2</Order>
<Type>Primary</Type>
</CreatePartition>
<CreatePartition wcm:action="add">
<Extend>true</Extend>
<Order>3</Order>
<Type>Primary</Type>
</CreatePartition>
</CreatePartitions>
<ModifyPartitions>
<ModifyPartition wcm:action="add">
<Active>true</Active>
<Format>NTFS</Format>
<Label>System Reserved</Label>
<Order>1</Order>
<PartitionID>1</PartitionID>
<Extend>false</Extend>
</ModifyPartition>
<ModifyPartition wcm:action="add">
<Active>false</Active>
<Extend>false</Extend>
<Format>NTFS</Format>
<Label>System</Label>
<Letter>C</Letter>
<Order>2</Order>
<PartitionID>2</PartitionID>
</ModifyPartition>
<ModifyPartition wcm:action="add">
<Active>false</Active>
<Extend>false</Extend>
<Format>NTFS</Format>
<Label>Daten</Label>
<Letter>D</Letter>
<Order>3</Order>
<PartitionID>3</PartitionID>
</ModifyPartition>
</ModifyPartitions>
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
</Disk>
<WillShowUI>OnError</WillShowUI>
</DiskConfiguration>
</component>
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SetupUILanguage>
<UILanguage>en-US</UILanguage>
</SetupUILanguage>
<InputLocale>de-DE</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>
<UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>de-DE</UserLocale>
</component>
</settings>
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ProductKey>key</ProductKey>
<ComputerName>*</ComputerName>
<RegisteredOrganization>.</RegisteredOrganization>
<RegisteredOwner>.</RegisteredOwner>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OOBE>
<HideEULAPage>true</HideEULAPage>
<NetworkLocation>Home</NetworkLocation>
<ProtectYourPC>3</ProtectYourPC>
</OOBE>
<RegisteredOrganization>.</RegisteredOrganization>
<RegisteredOwner>.</RegisteredOwner>
<TimeZone>W. Europe Standard Time</TimeZone>
<FolderLocations>
<ProfilesDirectory>D:\Users\</ProfilesDirectory>
</FolderLocations>
</component>
</unattend>

Link to comment
Share on other sites


What do you mean? Space of the Partitions?

Refer to the autounattend.xml my partitions are

1. System Reserved 200MB

2. System 20GB

3. extend

The harddisk is a vdi file with 40 GB size.

best regards

Link to comment
Share on other sites

Yes, I can read it in the unattend what you want to do, but you are saying you are not getting the correct results, but do not tell us what results you are getting.

Can you post specifics on what results you do get? You can either put in a picture of how it appears in Disk Management, or run Detail Disk/Part/Vol with Diskpart to get some numbers.

Link to comment
Share on other sites

It's easy after some time it shows the Partition Window with Disk 0 unallocated Space and that's all nothing more.

It looks like the xml file is corrupt or something but the xml validation of the wsim shows me no problems.

Link to comment
Share on other sites

Does the order of the lines matter?

This works like a charm for me:



<DiskConfiguration>
<Disk wcm:action="add">
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
<CreatePartitions>
<CreatePartition wcm:action="add">
<Order>1</Order>
<Type>Primary</Type>
<Size>100</Size>
</CreatePartition>
<CreatePartition wcm:action="add">
<Order>2</Order>
<Type>Primary</Type>
<Size>100000</Size>
</CreatePartition>
<CreatePartition wcm:action="add">
<Order>3</Order>
<Type>Primary</Type>
<Extend>true</Extend>
</CreatePartition>
</CreatePartitions>
<ModifyPartitions>
<ModifyPartition wcm:action="add">
<Order>1</Order>
<PartitionID>1</PartitionID>
<Active>true</Active>
<Format>NTFS</Format>
<Label>Boot</Label>
</ModifyPartition>
<ModifyPartition wcm:action="add">
<Order>2</Order>
<PartitionID>2</PartitionID>
<Format>NTFS</Format>
<Letter>C</Letter>
</ModifyPartition>
<ModifyPartition wcm:action="add">
<Order>3</Order>
<PartitionID>3</PartitionID>
<Format>NTFS</Format>
<Letter>D</Letter>
</ModifyPartition>
</ModifyPartitions>
</Disk>
</DiskConfiguration>


Link to comment
Share on other sites

Sorry for my delayed response I had some exams but now I'm finished.

I try the step with removing the extend options and replace it with a fixed size -> doesn't work.

@TheWalrus

I'll test your file to verify if the error comes from the orders of the lines.

Link to comment
Share on other sites

I use Virtualbox to test my windows 7 setup here a some information

vCPU:1

Ram: 1024 MB

HD: 40 GB

Sata0: Optical Drive

Sata1: Harddisk 0

The Harddisk on Sata1 is correctly recognized as Disk0.

VirtualBox 4.1.12 (newest)

Edited by b1nb4sh
Link to comment
Share on other sites

I found some solution. When the harddisk is unallocated (means no partions on it) the autopartition doesn't work but when I format the disk and restart the setup it works. The Disks are formatted and the setup runs through.

Maybe I should change this section to modify?

<Disk wcm:action="add">

Link to comment
Share on other sites

  • 2 weeks later...

I am a newbi to the idea of making custom/automated windows 7 installer - Can someone please guide me

my objectives are

complete automated installation

1. Auto accept - Install Now

2. Auto accept - EULA

3. Auto partition - 100MB - SYSTEM / 100GB - Windows/ and remainder into 3 partitions (this should be auto - should automatically device remainder of 250gb/500gb and so on)

4. Auto accept time zone

5. Choose security settings to Ask Me Later

Can some one please help

Link to comment
Share on other sites

Remember to change the size for the partition C:\ when you use with VirtualBox or on a real HDD!


<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="[url="http://schemas.microsoft.com/WMIConfig/2002/State"]http://schemas.microsoft.com/WMIConfig/2002/State[/url]" xmlns:xsi="[url="http://www.w3.org/2001/XMLSchema-instance"]http://www.w3.org/2001/XMLSchema-instance[/url]">
<Diagnostics>
<OptIn>false</OptIn>
</Diagnostics>
<DiskConfiguration>
<WillShowUI>OnError</WillShowUI>
<Disk wcm:action="add">
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
<CreatePartitions>
<CreatePartition wcm:action="add">
<Order>1</Order>
<Type>Primary</Type>
<Size>100</Size>
</CreatePartition>
<CreatePartition wcm:action="add">
<Order>2</Order>
<Size>10000</Size>
<Type>Primary</Type>
</CreatePartition>
<CreatePartition wcm:action="add">
<Order>3</Order>
<Type>Primary</Type>
<Extend>true</Extend>
</CreatePartition>
</CreatePartitions>
<ModifyPartitions>
<ModifyPartition wcm:action="add">
<Order>1</Order>
<PartitionID>1</PartitionID>
<Label>System</Label>
<Format>NTFS</Format>
<Active>true</Active>
</ModifyPartition>
<ModifyPartition wcm:action="add">
<Order>2</Order>
<PartitionID>2</PartitionID>
<Letter>C</Letter>
<Label>SEVEN</Label>
<Format>NTFS</Format>
</ModifyPartition>
<ModifyPartition wcm:action="add">
<Order>3</Order>
<Format>NTFS</Format>
<PartitionID>3</PartitionID>
<Label>DATA</Label>
<Letter>D</Letter>
</ModifyPartition>
</ModifyPartitions>
</Disk>
</DiskConfiguration>

Example here with: C:\ partition with 10GB. When you want use with a real HDD, adapt the size to suit your needs!

More help about Autounattend.xml file:

http://www.msfn.org/board/topic/139572-ask-your-seven-xml-here/

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...