Windows not installing drive order with my autounattend.xml


  1. Posts : 23
    Windows 11 Pro
       #1

    Windows not installing drive order with my autounattend.xml


    I need help setting up the following drive order in WSIM to install windows and to show EFI-MSR-Windows-Recovery in disk partition. With my autounattend.xml I tried changing the orders to match in WSIM but no go when it came to install time. Any ideas? WSIM validates the answer key. Below is my autounattend.xml

    Windows not installing drive order with my autounattend.xml-screenshot-2023-08-15-173227.png


    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
        <settings pass="windowsPE">
            <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>en-US</InputLocale>
                <SystemLocale>en-US</SystemLocale>
                <UILanguage>en-US</UILanguage>
                <UserLocale>en-US</UserLocale>
            </component>
            <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">
                <DiskConfiguration>
                    <Disk wcm:action="add">
                        <CreatePartitions>
                            <CreatePartition wcm:action="add">
                                <Type>EFI</Type>
                                <Size>100</Size>
                                <Order>1</Order>
                            </CreatePartition>
                            <CreatePartition wcm:action="add">
                                <Order>2</Order>
                                <Type>MSR</Type>
                                <Size>16</Size>
                            </CreatePartition>
                            <CreatePartition wcm:action="add">
                                <Extend>true</Extend>
                                <Order>3</Order>
                                <Type>Primary</Type>
                            </CreatePartition>
                            <CreatePartition wcm:action="add">
                                <Order>4</Order>
                                <Size>500</Size>
                                <Type>Primary</Type>
                            </CreatePartition>
                        </CreatePartitions>
                        <ModifyPartitions>
                            <ModifyPartition wcm:action="add">
                                <Label>System</Label>
                                <Format>FAT32</Format>
                                <Order>1</Order>
                                <PartitionID>1</PartitionID>
                                <TypeID></TypeID>
                            </ModifyPartition>
                            <ModifyPartition wcm:action="add">
                                <Order>2</Order>
                                <PartitionID>2</PartitionID>
                                <Label></Label>
                            </ModifyPartition>
                            <ModifyPartition wcm:action="add">
                                <Format>NTFS</Format>
                                <Label>Windows</Label>
                                <Letter>C</Letter>
                                <Order>3</Order>
                                <PartitionID>3</PartitionID>
                            </ModifyPartition>
                            <ModifyPartition wcm:action="add">
                                <Format>NTFS</Format>
                                <Label>WinRE</Label>
                                <Order>4</Order>
                                <PartitionID>4</PartitionID>
                                <TypeID>DE94BBA4-06D1-4D40-A16A-BFD50179D6AC</TypeID>
                            </ModifyPartition>
                        </ModifyPartitions>
                        <DiskID>0</DiskID>
                        <WillWipeDisk>true</WillWipeDisk>
                    </Disk>
                    <WillShowUI>OnError</WillShowUI>
                </DiskConfiguration>
                <ImageInstall>
                    <OSImage>
                        <InstallTo>
                            <DiskID>0</DiskID>
                            <PartitionID>3</PartitionID>
                        </InstallTo>
                    </OSImage>
                </ImageInstall>
                <UserData>
                    <ProductKey>
                        <Key>VK7JG-NPHTM-C97JM-9MPGT-3V66T</Key>
                    </ProductKey>
                    <AcceptEula>true</AcceptEula>
                    <Organization>Equipment Depot</Organization>
                </UserData>
            </component>
        </settings>
        <settings pass="oobeSystem">
            <component name="Microsoft-Windows-International-Core" 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">
                <InputLocale>en-US</InputLocale>
                <SystemLocale>en-US</SystemLocale>
                <UILanguage>en-US</UILanguage>
                <UserLocale>en-US</UserLocale>
            </component>
            <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">
                <UserAccounts>
                    <LocalAccounts>
                        <LocalAccount wcm:action="add">
                            <Password>
                                <Value>RwBkAHAAOAA3AG8AcgAzACMAUABhAHMAcwB3AG8AcgBkAA==</Value>
                                <PlainText>false</PlainText>
                            </Password>
                            <DisplayName>EQDAdmin</DisplayName>
                            <Group>Administrators</Group>
                            <Name>EQDAdmin</Name>
                        </LocalAccount>
                    </LocalAccounts>
                </UserAccounts>
                <OOBE>
                    <HideEULAPage>true</HideEULAPage>
                    <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
                    <HideOnlineAccountScreens>true</HideOnlineAccountScreens>
                    <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
                    <ProtectYourPC>1</ProtectYourPC>
                    <UnattendEnableRetailDemo>false</UnattendEnableRetailDemo>
                </OOBE>
                <AutoLogon>
                    <Password>
                        <Value>RwBkAHAAOAA3AG8AcgAzACMAUABhAHMAcwB3AG8AcgBkAA==</Value>
                        <PlainText>false</PlainText>
                    </Password>
                    <Enabled>true</Enabled>
                    <Username>EQDAdmin</Username>
                    <LogonCount>1</LogonCount>
                </AutoLogon>
                <RegisteredOwner>Equipment Depot</RegisteredOwner>
            </component>
        </settings>
        <cpi:offlineImage cpi:source="wim:f:/install.wim#Windows11Pro" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>
    Last edited by Brink; 15 Aug 2023 at 19:37. Reason: code box
      My Computer


  2. Posts : 4,807
    Windows 11 Pro 64 Bit 22H2
       #2

    To enable BitLocker encryption using a command prompt and an XML file, you would typically use the "manage-bde" command along with an XML file containing the encryption settings. Here's a step-by-step guide on how to do this:

    Create an XML file with encryption settings: Create a text file (e.g., bitlocker_settings.xml) and add the following content, modifying it to match your desired encryption settings:
    <BitLockerSettings>
    <EncryptionMethod>AES256</EncryptionMethod>
    <UsedSpaceOnly>false</UsedSpaceOnly>
    <Pin>{YourPIN}</Pin>
    <RecoveryPassword>{YourRecoveryPassword}</RecoveryPassword>
    </BitLockerSettings>
    Replace {YourPIN} and {YourRecoveryPassword} with your desired PIN and recovery password respectively. Make sure to remember or securely store your recovery password.

    Open Command Prompt as Administrator: Press Win + X and select "Command Prompt (Admin)" or "Windows Terminal (Admin)" from the menu.

    Run the BitLocker Encryption command: In the Command Prompt, navigate to the directory where your bitlocker_settings.xml file is located. Use the following command to enable BitLocker encryption using the XML file:

    manage-bde -on C: -rp path\to\bitlocker_settings.xml
    Replace C: with the drive letter you want to encrypt and path\to\bitlocker_settings.xml with the actual path to your XML file.

    Follow the prompts: BitLocker will prompt you to confirm the encryption. Follow the prompts to continue. You will need to restart your computer if you're encrypting the operating system drive.
      My Computer


  3. Posts : 23
    Windows 11 Pro
    Thread Starter
       #3

    I’m trying to get the drive partitions to install in the order I need them.

    - - - Updated - - -

    I’m not trying to install bitlocker, I just want the drive partition to install in the order I provided above, however your reply was still very helpful
      My Computer


  4. Posts : 787
    Windows 7
       #4

    You're likely copying/pasting text, because the lines are out of order. Computers don't really care about proper indentation, or the ordering within an XML block, but it really helps when reading it.

    After cleaning up your DiskConfiguration:
    Code:
    <DiskConfiguration>
        <Disk wcm:action="add">
            <DiskID>0</DiskID>
            <WillWipeDisk>true</WillWipeDisk>
            <CreatePartitions>
                <CreatePartition wcm:action="add">
                    <Order>1</Order>
                    <Size>100</Size>
                    <Type>EFI</Type>
                </CreatePartition>
                <CreatePartition wcm:action="add">
                    <Order>2</Order>
                    <Size>16</Size>
                    <Type>MSR</Type>
                </CreatePartition>
                <CreatePartition wcm:action="add">
                    <Order>3</Order>
                    <Extend>true</Extend>
                    <Type>Primary</Type>
                </CreatePartition>
                <CreatePartition wcm:action="add">
                    <Order>4</Order>
                    <Size>500</Size>
                    <Type>Primary</Type>
                </CreatePartition>
            </CreatePartitions>
            <ModifyPartitions>
                <ModifyPartition wcm:action="add">
                    <Format>FAT32</Format>
                    <Order>1</Order>
                    <PartitionID>1</PartitionID>
                    <TypeID></TypeID>
                    <Label>System</Label>
                </ModifyPartition>
                <ModifyPartition wcm:action="add">
                    <Order>2</Order>
                    <PartitionID>2</PartitionID>
                    <Label></Label>
                </ModifyPartition>
                <ModifyPartition wcm:action="add">
                    <Format>NTFS</Format>
                    <Order>3</Order>
                    <PartitionID>3</PartitionID>
                    <Label>Windows</Label>
                    <Letter>C</Letter>
                </ModifyPartition>
                <ModifyPartition wcm:action="add">
                    <Format>NTFS</Format>
                    <Order>4</Order>
                    <PartitionID>4</PartitionID>
                    <TypeID>DE94BBA4-06D1-4D40-A16A-BFD50179D6AC</TypeID>
                    <Label>WinRE</Label>
                </ModifyPartition>
            </ModifyPartitions>
        </Disk>
        <WillShowUI>OnError</WillShowUI>
    </DiskConfiguration>
    1. The first mistake is you inserted an empty <TypeID></TypeID> in ModifyPartitions. TypeID's can never be undefined.

    2. The second mistake is PartitionID 3 is Extend, but most users forget Extend implies from [here] to the end of the disk. You cannot have another partition blocking the end of the disk.

    This is the dreaded "Recovery is placed at the end" problem. The current best practice is to drop the Recovery at the disk's tail so Windows can the shrink System partition to allow Recovery to grow. This can't happen if Recovery is sandwiched between two other fixed partitions.

    But the problem is you can't define it this way using Unattended. You must provided a fixed length or swap the partition order. So how does Setup get it done? Setup cheats by follows this logic: it extends the System partition to the end, but shrinks it to allow room for Recovery, before creating Recovery.

    Unfortunately, the Unattended XML isn't smart enough to support this logic. What you need is a script to run diskpart and follow the same logic. MS provides a few examples:

    https://learn.microsoft.com/en-us/wi...iew=windows-10

    - - - Updated - - -

    You may want to redact that password.
      My Computer


  5. Posts : 23
    Windows 11 Pro
    Thread Starter
       #5

    garlin said:
    You're likely copying/pasting text, because the lines are out of order. Computers don't really care about proper indentation, or the ordering within an XML block, but it really helps when reading it.

    After cleaning up your DiskConfiguration:
    Code:
    <DiskConfiguration>
        <Disk wcm:action="add">
            <DiskID>0</DiskID>
            <WillWipeDisk>true</WillWipeDisk>
            <CreatePartitions>
                <CreatePartition wcm:action="add">
                    <Order>1</Order>
                    <Size>100</Size>
                    <Type>EFI</Type>
                </CreatePartition>
                <CreatePartition wcm:action="add">
                    <Order>2</Order>
                    <Size>16</Size>
                    <Type>MSR</Type>
                </CreatePartition>
                <CreatePartition wcm:action="add">
                    <Order>3</Order>
                    <Extend>true</Extend>
                    <Type>Primary</Type>
                </CreatePartition>
                <CreatePartition wcm:action="add">
                    <Order>4</Order>
                    <Size>500</Size>
                    <Type>Primary</Type>
                </CreatePartition>
            </CreatePartitions>
            <ModifyPartitions>
                <ModifyPartition wcm:action="add">
                    <Format>FAT32</Format>
                    <Order>1</Order>
                    <PartitionID>1</PartitionID>
                    <TypeID></TypeID>
                    <Label>System</Label>
                </ModifyPartition>
                <ModifyPartition wcm:action="add">
                    <Order>2</Order>
                    <PartitionID>2</PartitionID>
                    <Label></Label>
                </ModifyPartition>
                <ModifyPartition wcm:action="add">
                    <Format>NTFS</Format>
                    <Order>3</Order>
                    <PartitionID>3</PartitionID>
                    <Label>Windows</Label>
                    <Letter>C</Letter>
                </ModifyPartition>
                <ModifyPartition wcm:action="add">
                    <Format>NTFS</Format>
                    <Order>4</Order>
                    <PartitionID>4</PartitionID>
                    <TypeID>DE94BBA4-06D1-4D40-A16A-BFD50179D6AC</TypeID>
                    <Label>WinRE</Label>
                </ModifyPartition>
            </ModifyPartitions>
        </Disk>
        <WillShowUI>OnError</WillShowUI>
    </DiskConfiguration>
    1. The first mistake is you inserted an empty <TypeID></TypeID> in ModifyPartitions. TypeID's can never be undefined.

    2. The second mistake is PartitionID 3 is Extend, but most users forget Extend implies from [here] to the end of the disk. You cannot have another partition blocking the end of the disk.

    This is the dreaded "Recovery is placed at the end" problem. The current best practice is to drop the Recovery at the disk's tail so Windows can the shrink System partition to allow Recovery to grow. This can't happen if Recovery is sandwiched between two other fixed partitions.

    But the problem is you can't define it this way using Unattended. You must provided a fixed length or swap the partition order. So how does Setup get it done? Setup cheats by follows this logic: it extends the System partition to the end, but shrinks it to allow room for Recovery, before creating Recovery.

    Unfortunately, the Unattended XML isn't smart enough to support this logic. What you need is a script to run diskpart and follow the same logic. MS provides a few examples:

    https://learn.microsoft.com/en-us/wi...iew=windows-10

    - - - Updated - - -

    You may want to redact that password.
    One moment let me fix this

    - - - Updated - - -

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
        <settings pass="windowsPE">
            <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>en-US</InputLocale>
                <SystemLocale>en-US</SystemLocale>
                <UILanguage>en-US</UILanguage>
                <UserLocale>en-US</UserLocale>
            </component>
            <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">
                <DiskConfiguration>
                    <Disk wcm:action="add">
                        <CreatePartitions>
                            <CreatePartition wcm:action="add">
                                <Type>EFI</Type>
                                <Size>100</Size>
                                <Order>1</Order>
                            </CreatePartition>
                            <CreatePartition wcm:action="add">
                                <Order>2</Order>
                                <Type>MSR</Type>
                                <Size>16</Size>
                            </CreatePartition>
                            <CreatePartition wcm:action="add">
                                <Extend>true</Extend>
                                <Order>3</Order>
                                <Type>Primary</Type>
                            </CreatePartition>
                            <CreatePartition wcm:action="add">
                                <Order>4</Order>
                                <Size>500</Size>
                                <Type>Primary</Type>
                            </CreatePartition>
                        </CreatePartitions>
                        <ModifyPartitions>
                            <ModifyPartition wcm:action="add">
                                <Label>System</Label>
                                <Format>FAT32</Format>
                                <Order>1</Order>
                                <PartitionID>1</PartitionID>
                                <TypeID></TypeID>
                            </ModifyPartition>
                            <ModifyPartition wcm:action="add">
                                <Order>2</Order>
                                <PartitionID>2</PartitionID>
                                <Label></Label>
                            </ModifyPartition>
                            <ModifyPartition wcm:action="add">
                                <Format>NTFS</Format>
                                <Label>Windows</Label>
                                <Letter>C</Letter>
                                <Order>3</Order>
                                <PartitionID>3</PartitionID>
                            </ModifyPartition>
                            <ModifyPartition wcm:action="add">
                                <Format>NTFS</Format>
                                <Label>WinRE</Label>
                                <Order>4</Order>
                                <PartitionID>4</PartitionID>
                                <TypeID>DE94BBA4-06D1-4D40-A16A-BFD50179D6AC</TypeID>
                            </ModifyPartition>
                        </ModifyPartitions>
                        <DiskID>0</DiskID>
                        <WillWipeDisk>true</WillWipeDisk>
                    </Disk>
                    <WillShowUI>OnError</WillShowUI>
                </DiskConfiguration>
                <ImageInstall>
                    <OSImage>
                        <InstallTo>
                            <DiskID>0</DiskID>
                            <PartitionID>3</PartitionID>
                        </InstallTo>
                    </OSImage>
                </ImageInstall>
                <UserData>
                    <ProductKey>
                        <Key>VK7JG-NPHTM-C97JM-9MPGT-3V66T</Key>
                    </ProductKey>
                    <AcceptEula>true</AcceptEula>
                    <Organization>Equipment Depot</Organization>
                </UserData>
            </component>
        </settings>
        <settings pass="oobeSystem">
            <component name="Microsoft-Windows-International-Core" 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">
                <InputLocale>en-US</InputLocale>
                <SystemLocale>en-US</SystemLocale>
                <UILanguage>en-US</UILanguage>
                <UserLocale>en-US</UserLocale>
            </component>
            <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">
                <UserAccounts>
                    <LocalAccounts>
                        <LocalAccount wcm:action="add">
                            <Password>
                                <Value>RwBkAHAAOAA3AG8AcgAzACMAUABhAHMAcwB3AG8AcgBkAA==</Value>
                                <PlainText>false</PlainText>
                            </Password>
                            <DisplayName>EQDAdmin</DisplayName>
                            <Group>Administrators</Group>
                            <Name>EQDAdmin</Name>
                        </LocalAccount>
                    </LocalAccounts>
                </UserAccounts>
                <OOBE>
                    <HideEULAPage>true</HideEULAPage>
                    <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
                    <HideOnlineAccountScreens>true</HideOnlineAccountScreens>
                    <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
                    <ProtectYourPC>1</ProtectYourPC>
                    <UnattendEnableRetailDemo>false</UnattendEnableRetailDemo>
                </OOBE>
                <AutoLogon>
                    <Password>
                        <Value>RwBkAHAAOAA3AG8AcgAzACMAUABhAHMAcwB3AG8AcgBkAA==</Value>
                        <PlainText>false</PlainText>
                    </Password>
                    <Enabled>true</Enabled>
                    <Username>EQDAdmin</Username>
                    <LogonCount>1</LogonCount>
                </AutoLogon>
                <RegisteredOwner>Equipment Depot</RegisteredOwner>
            </component>
        </settings>
        <cpi:offlineImage cpi:source="wim:f:/install.wim#Windows11Pro" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>
      My Computer


  6. Posts : 787
    Windows 7
       #6

    Thanks, my answer is the same as before.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 05:53.
Find Us




Windows 10 Forums