Where Customization Begins 

  • How to Configure Hard drives (HD) using WSIM

  • Windows® Automated Installation Kit (WAIK), Windows System Image Manager (WSIM), Win PE and Windows Assessment and Deployment Kit (ADK) Tutorials are right here.
Windows® Automated Installation Kit (WAIK), Windows System Image Manager (WSIM), Win PE and Windows Assessment and Deployment Kit (ADK) Tutorials are right here.
 #14008  by Neuropass
 06 Mar 2011, 19:59
Open up WSIM (IF your are not sure how, read Here.) and select Microsoft-Windows-Setup from the choices in the Components section of Windows Image. Expand DiskConfiguration and then right-click on Disk and choose Add Setting to Pass 1 windowsPE


Image


set the DiskID to "0" in properties


Image

NOTE:
if you try to deploy and get an error message stating Windows could not create a partition on disk 0. The error occurred while applying the unattend answer file's <DiskConfiguration> setting. Error Code:0x80004005 then set the WillWipeDisk to true



Image


Partition the hard disc

Now we want to partition the hard disk to be , let's say 40GB in size so, add the Microsoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartition component to the windowsPE pass.



Image


set the properties to order=1, size=40000 and type=primary


Image



Mark as active and format with NTFS

Add the Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ModifyPartition node to the windowsPE pass



Image



edit your settings like this, make sure to set order and partition ID or this will not work...


Image



Tell Windows where to install

Now that we've got our hard disc sorted we need to tell Windows where to install to, so add the Microsoft-Windows-Setup\ImageInstall\OSImage\InstallTo node to the windowsPE configuration pass


Image


Now set the DiskID to 0 and PartitionID to 1


Image



Add more partitions

If you want to add more partitions you can do so as follows:

Right-click on CreatePartitions and choose Insert New CreatePartition


Image



when the properties screen appears, fill in the values for Order, Size and Type (do not set Extend to True if Size is set to a value)

Image


Now that we have created our new partition, you need to modify it, so right click on ModifyPartitions and choose Insert New Modify Parition



Image



make your changes to the properties paying close attention to the Order and PartitionID values otherwise the deployment won't work


Image


validate your answer file by clicking on the validate button. done.



Echo_Platoon wrote:Good job on this, Neuropass.

As far as the 100 MB partition, it shouldn't get a drive letter if configured/set up properly. If done properly, C: would still be your "Windows" drive and D: would still be your "Data" drive. That 100 MB partition contains the Windows Recovery Environment as well as stuff for BitLocker and boot files with boot manager.

If you want to keep this 100 MB partition but don't want it to have a drive letter, you add the following line to the Modify Partition part of the XML file for that partition:
Code: Select all<TypeID>0x27</TypeID>



Here's an example taken from a working XML file:
Code: Select all<ModifyPartition wcm:action="add">
      <Order>1</Order>
      <PartitionID>1</PartitionID>
      <Label>Recovery</Label>
      <Format>NTFS</Format>
      <TypeID>0x27</TypeID>
</ModifyPartition>
 #14016  by Neuropass
 06 Mar 2011, 23:42
Your welcome mate, to have it working without the hidden partition, you need to use this patch posted Here.
 #14024  by Neuropass
 07 Mar 2011, 01:58
There won't be any Hidden partition if you use the patch posted in the link above.
 #14026  by VistaKing
 07 Mar 2011, 03:28
Do I have to set the User configuration Set ? Leave the same name of the XML file or should it be Unattend.xml ? I am not home at the moment but I will try that tutorial out and I will let you know.

Ok I added the patched winsetup.dll file to my Boot.wim and used your tutorial to create a new Autounattend.xml file . Got an error message of
" Windows could not extend a partition on disk 0.The target disk, partition, or volume does not support the specified operation. The error occurred while applying the unattend answer file's<DiskConfiguration> setting. Error code: 0x80300024.

Here is the new Autounattend.xml file


Spoiler: show
Code: Select all<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="windowsPE">
        <component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <DiskConfiguration>
                <Disk wcm:action="add">
                    <CreatePartitions>
                        <CreatePartition wcm:action="add">
                            <Order>1</Order>
                            <Size>40000</Size>
                            <Type>Primary</Type>
                        </CreatePartition>
                        <CreatePartition wcm:action="add">
                            <Order>2</Order>
                            <Extend>true</Extend>
                            <Type>Primary</Type>
                        </CreatePartition>
                    </CreatePartitions>
                    <ModifyPartitions>
                        <ModifyPartition wcm:action="add">
                            <Active>true</Active>
                            <Format>NTFS</Format>
                            <Label>Win7_OS</Label>
                            <Letter>C</Letter>
                            <Order>1</Order>
                            <PartitionID>1</PartitionID>
                        </ModifyPartition>
                        <ModifyPartition wcm:action="add">
                            <Active>false</Active>
                            <Extend>true</Extend>
                            <Format>NTFS</Format>
                            <Label>DATA</Label>
                            <Letter>D</Letter>
                            <Order>2</Order>
                            <PartitionID>2</PartitionID>
                        </ModifyPartition>
                    </ModifyPartitions>
                    <DiskID>0</DiskID>
                    <WillWipeDisk>true</WillWipeDisk>
                </Disk>
            </DiskConfiguration>
            <ImageInstall>
                <OSImage>
                    <InstallTo>
                        <DiskID>0</DiskID>
                        <PartitionID>1</PartitionID>
                    </InstallTo>
                </OSImage>
            </ImageInstall>
        </component>
    </settings>
    <settings pass="oobeSystem">
        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <FolderLocations>
                <ProfilesDirectory>D:\Users</ProfilesDirectory>
                <ProgramData>D:\ProgramData</ProgramData>
            </FolderLocations>
        </component>
    </settings>
    <cpi:offlineImage cpi:source="wim:g:/sources/install.wim#Windows 7 ULTIMATE" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>
 #14034  by Neuropass
 08 Mar 2011, 00:09
How is your HD? is it formatted ?
 #14036  by VistaKing
 08 Mar 2011, 01:51
Neuropass...

Yes my hard drive is formatted . It had and OS installed before. It was setup OS(C:\WINDOWS) and DATA(D:\DATA) . I want to format the drive remove the partitions and recreate them using the Autounattend.xml file . C: 40-50GB and D: the rest of the drive . Right now all I get in the drive setup during installation is Disk 0 Unallocated .
 #14037  by Neuropass
 08 Mar 2011, 02:43
Here mate,

I just created the XML file for and I tested it with ROG Sp1. Try it out, it will create a C partition of 50Gigs and a second one of 30 gigs.

Autounattend.xml


It is working, so have fun to personalize it the way you like it.
You do not have the required permissions to view the files attached to this post.
 #14038  by VistaKing
 08 Mar 2011, 03:38
Thanx bro for making me the xml file . I tried removing the 30GB on the second partition to use the rest of the drive after the 50GBs on the first partition. But wouldn't let me . Also added the D:\Users and D:\ProgramData folders inside the XML file . Now the Hard drive still says Disk 0 Unallocated Space 149.0 GB

Spoiler: show
Code: Select all<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="windowsPE">
        <component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <DiskConfiguration>
                <WillShowUI>OnError</WillShowUI>
                <Disk wcm:action="add">
                    <CreatePartitions>
                        <CreatePartition wcm:action="add">
                            <Order>1</Order>
                            <Size>50000</Size>
                            <Type>Primary</Type>
                        </CreatePartition>
                        <CreatePartition wcm:action="add">
                            <Order>2</Order>
                            <Size>30000</Size>
                            <Type>Primary</Type>
                            <Extend>true</Extend>
                        </CreatePartition>
                    </CreatePartitions>
                    <ModifyPartitions>
                        <ModifyPartition wcm:action="add">
                            <Active>true</Active>
                            <Format>NTFS</Format>
                            <Label>WIN7_OS</Label>
                            <Order>1</Order>
                            <PartitionID>1</PartitionID>
                        </ModifyPartition>
                        <ModifyPartition wcm:action="add">
                            <Format>NTFS</Format>
                            <Label>Data</Label>
                            <Letter>D</Letter>
                            <Order>2</Order>
                            <PartitionID>2</PartitionID>
                            <Extend>true</Extend>
                        </ModifyPartition>
                    </ModifyPartitions>
                    <DiskID>0</DiskID>
                    <WillWipeDisk>true</WillWipeDisk>
                </Disk>
            </DiskConfiguration>
            <Display>
                <ColorDepth>32</ColorDepth>
                <HorizontalResolution>1024</HorizontalResolution>
                <RefreshRate>60</RefreshRate>
                <VerticalResolution>768</VerticalResolution>
            </Display>
            <DynamicUpdate>
                <Enable>false</Enable>
            </DynamicUpdate>
            <UserData>
                <AcceptEula>true</AcceptEula>
            </UserData>
            <ImageInstall>
                <OSImage>
                    <InstallTo>
                        <DiskID>0</DiskID>
                        <PartitionID>1</PartitionID>
                    </InstallTo>
                </OSImage>
            </ImageInstall>
        </component>
        <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="x86" 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>en-US</InputLocale>
            <SystemLocale>en-US</SystemLocale>
            <UILanguage>en-US</UILanguage>
            <UILanguageFallback>en-US</UILanguageFallback>
            <UserLocale>en-US</UserLocale>
        </component>
    </settings>
    <settings pass="specialize">
        <component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <Identification>
                <JoinWorkgroup>Workgroup</JoinWorkgroup>
            </Identification>
        </component>
        <component name="Microsoft-Windows-International-Core" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <InputLocale>en-US</InputLocale>
            <SystemLocale>en-US</SystemLocale>
            <UILanguage>en-US</UILanguage>
            <UILanguageFallback>en-US</UILanguageFallback>
            <UserLocale>en-US</UserLocale>
        </component>
    </settings>
    <settings pass="oobeSystem">
        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <FolderLocations>
                <ProfilesDirectory>D:\Users</ProfilesDirectory>
                <ProgramData>D:\ProgramData</ProgramData>
            </FolderLocations>
        </component>
    </settings>
    <cpi:offlineImage cpi:source="wim:c:/7work/boot/sources/install.wim#Windows 7 ULTIMATE" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>


Ok I got it to work some how . Don't know what I did to get it to install LOL. But Now I have C:\ProgramData and D:\ProgramData. I want ProgramData away from C:\ and be only in D:\ if that is possible?.Neuropass thanx bro for helping me with this XML file .