AutoUnattend.xml Partitioning Failure

Page 1 of 7 123 ... LastLast

  1. Posts : 8
    Windows 10 Pro 1803
       #1

    AutoUnattend.xml Partitioning Failure


    Hey everyone,

    I know this is a common question and answer, so I am hoping someone can help me out by showing me what I am missing here...I have gotten my AutoUnattend.xml file to do everything I need it to, except for correctly partitioning the hard drive. I always have to delete the partition manually and then let Windows 10 create the partitions for me afterwards.

    Quick low down on how I am doing OSD:
    - create / capture custom image file
    - drop image file onto Windows 10 USB
    - use USB duplicator and make 10 copies of the main USB at a time
    - 40 flash drives get plugged into 40 computers and the imaging is done, except the partitioning

    I have read through the MS sites and walk throughs, all the books I can get about using the ADK / WSIM to create the partitions through the AutoUnattend.xml file, but I still get the light touch install instead of the zero touch install I am attempting to achieve here.

    I am attaching my AutoUnattend.xml file with user names, passwords, network paths, etc., removed. The main concern I have here is why is the partitioning will not go through; once I have that, the rest is gravy.

    Thank you to any and all who take the time to assist with this, I feel like a lunk head for not being able to get this, but I have been working at it now for over 6 months and I just cannot see what I am missing, so I need to reach out to the experts and hope one of you can shine some light into the dim room I am in here with this file.

    Thanks again.


    AutoUnattend for TenForums.txt
      My Computer


  2. Posts : 4,187
    Windows 11 Pro, 22H2
       #2

    Vincent,

    First, I see that you are creating 4 partitions. That implies that this is a UEFI system booting in UEFI mode (not legacy mode). Is that correct? If not, we need to completely change the scheme.

    Next, when I compare your Autounattend.xml to mine (which works flawlessly), I notice that both in the "CreatePartitions" and "ModifyPartititions" sections, you have > action="modify" but I have action="add". I'm not 100% sure what the difference is.

    Below is my 100% unmodified autounattend.xml file. There is nothing in here that I have to hide. The password is a blank password, the license key is a generic installation for Windows 10 Pro. The language is en-US and Central Standard Time in the United States.
    Last edited by hsehestedt; 30 May 2019 at 03:31.
      My Computers


  3. Posts : 4,187
    Windows 11 Pro, 22H2
       #3

    Sorry - I must have accidentally clicked on submit. I have more to say. Give me a minute to finish in the next post.
      My Computers


  4. Posts : 4,187
    Windows 11 Pro, 22H2
       #4

    My autounattend is also configured to autologon one time (one time only). This allows it to completely finish the portion of setup where you see all the messages like "We're setting things up for you", etc. When done, Windows setup is fully completed.

    So here then is my autounattend.xml:


    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">
                                <Order>1</Order>
                                <Size>450</Size>
                                <Type>Primary</Type>
                            </CreatePartition>
                            <CreatePartition wcm:action="add">
                                <Order>2</Order>
                                <Size>100</Size>
                                <Type>EFI</Type>
                            </CreatePartition>
                            <CreatePartition wcm:action="add">
                                <Order>3</Order>
                                <Size>16</Size>
                                <Type>MSR</Type>
                            </CreatePartition>
                            <CreatePartition wcm:action="add">
                                <Extend>true</Extend>
                                <Order>4</Order>
                                <Type>Primary</Type>
                            </CreatePartition>
                        </CreatePartitions>
                        <ModifyPartitions>
                            <ModifyPartition wcm:action="add">
                                <Format>NTFS</Format>
                                <Label>WinRE</Label>
                                <Order>1</Order>
                                <PartitionID>1</PartitionID>
                                <TypeID>DE94BBA4-06D1-4D40-A16A-BFD50179D6AC</TypeID>
                            </ModifyPartition>
                            <ModifyPartition wcm:action="add">
                                <Format>FAT32</Format>
                                <Label>System</Label>
                                <Order>2</Order>
                                <PartitionID>2</PartitionID>
                            </ModifyPartition>
                            <ModifyPartition wcm:action="add">
                                <Order>3</Order>
                                <PartitionID>3</PartitionID>
                            </ModifyPartition>
                            <ModifyPartition wcm:action="add">
                                <Format>NTFS</Format>
                                <Label>Windows</Label>
                                <Letter>C</Letter>
                                <Order>4</Order>
                                <PartitionID>4</PartitionID>
                            </ModifyPartition>
                        </ModifyPartitions>
                        <DiskID>0</DiskID>
                        <WillWipeDisk>true</WillWipeDisk>
                    </Disk>
                </DiskConfiguration>
                <ImageInstall>
                    <OSImage>
                        <InstallTo>
                            <DiskID>0</DiskID>
                            <PartitionID>4</PartitionID>
                        </InstallTo>
                    </OSImage>
                </ImageInstall>
                <UserData>
                    <ProductKey>
                        <Key>VK7JG-NPHTM-C97JM-9MPGT-3V66T</Key>
                    </ProductKey>
                    <AcceptEula>true</AcceptEula>
                </UserData>
            </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>
                    <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
                    <HideOnlineAccountScreens>true</HideOnlineAccountScreens>
                    <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
                    <ProtectYourPC>1</ProtectYourPC>
                    <UnattendEnableRetailDemo>false</UnattendEnableRetailDemo>
                </OOBE>
                <UserAccounts>
                    <LocalAccounts>
                        <LocalAccount wcm:action="add">
                            <DisplayName>Windows User</DisplayName>
                            <Group>Administrators</Group>
                            <Name>WinUser</Name>
                            <Password>
                                <Value>UABhAHMAcwB3AG8AcgBkAA==</Value>
                                <PlainText>false</PlainText>
                            </Password>
                        </LocalAccount>
                    </LocalAccounts>
                </UserAccounts>
                <TimeZone>Central Standard Time</TimeZone>
                <AutoLogon>
                    <Enabled>true</Enabled>
                    <LogonCount>1</LogonCount>
                    <Username>WinUser</Username>
                    <Password>
                        <Value>UABhAHMAcwB3AG8AcgBkAA==</Value>
                        <PlainText>false</PlainText>
                    </Password>
                </AutoLogon>
                <FirstLogonCommands>
                    <SynchronousCommand wcm:action="add">
                        <CommandLine>reg add &quot;HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon&quot; /v AutoLogonCount /t REG_DWORD /d 0 /f</CommandLine>
                        <Order>1</Order>
                    </SynchronousCommand>
                </FirstLogonCommands>
            </component>
            <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>
        </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">
                <TimeZone>Central Standard Time</TimeZone>
            </component>
        </settings>
        <cpi:offlineImage cpi:source="catalog://techsystem/x64/sources/install_windows 10 pro.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>
      My Computers


  5. Posts : 4,187
    Windows 11 Pro, 22H2
       #5

    Vincint, I had a couple more thoughts on this topic.

    First, you may want to take a look at the excellent tutorial from Kari located here:

    Create media for automated unattended install of Windows 10

    Note that this tutorial assumes that you will create a sysprep image. If you want to do an unattended installation with only an autounattend.xml answer file do this:

    Follow all the steps up through section 3.18 of the tutorial. Then skip to section 4. In section 4, rather than creating a new answer file called unattend.xml, continue adding the settings listed here to the autounattend.xml answer that you have already created with the following exceptions:

    In step 4.3, omit the "CopyProfile" setting (leave it alone and don't modify it at all).

    In step 4.4, if you specify the use of a logo file, you will need to copy it to C:\Windows\System32\oemlogo.bmp manually after installation of Windows.

    Continue through step 4.8.

    Once done, jump back to step 3.19 to finalize your answer file. If you want to automate your first time logon as noted below, follow those steps from below before you finalize the answer file.

    * Optional - Automate the First-Time Logon Setup *

    NOTE: Add these settings to the autounattend.xml answer file if you are creating only an autounattend.xml answer file and not creating a sysprep image. If you are creating a sysprep image (and thus, a second answer file named unattend.xml), then add these settings to the unattend.xml answer file instead.

    Using the steps up until this point, Windows installation will proceed to the point where you logon for the first time. During that first logon it takes another couple of minutes for setup to complete because you get the screens that say things like "Hi", "We're setting everything up for you", "This may take a few minutes", "Almost done", etc.

    If you want to automate this then you can add a onetime autologon by making the following additions to your answer file, otherwise just finalize the answer file at this time.

    From the Windows Image pane in Windows System Image Manager, expand Shell-Setup. Add both AutoLogon and FirstLogonCommands to Pass 7 oobe System. Select Shell-Setup > AutoLogon in the Answer File pane and set the following values:

    Enabled: true
    LogonCount: 1
    Username: <Use an admin username you created>

    Expand AutoLogon and select Password

    Set "Value" to the password for the username you just specified.

    Notes:

    1) There seems to be a problem with this field accepting a blank password. To work around this, enter anything in the Value field, making sure to hit Enter afterward. Then clear the password and again hit Enter. The Password block in the Answer File pane should turn dark to indicate that a change has been made.

    2) If you are going to change the password from an existing answer file, you may have to delete the whole Shell-Setup > UserAccounts section and recreate it. Do the same for the Shell-Setup > AutoLogon block.

    Right click on FirstLogonCommands in the Answer File pane and select Insert New SynchronousCommand.

    Select SynchronousCommand add set the following values (Note that the “reg add” entry is a long line and will wrap below):

    CommandLine: reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /t REG_DWORD /d 0 /f
    Order: 1

    NOTE: The entry you just made adds a registry entry because of a bug with how AutoLogon is handled. AutoLogon erroneously adds 1 to LogonCount value. As a result, you have to subtract 1 from the number of times you want it to logon. To logon once, you have to make the LogonCount 0. Unfortunately, Windows properly understands a LogonCount of 0 as meaning Never AutoLogon. To correct this, we must make the LogonCount 1 and use the registry entry to correct for this problem.

    Note: If you are creating a sysprep image, this will also affect your Reference system. At the point where you have completed creating the image file on the Reference system and you reboot normally, the reference system will logon and complete the setup. This is okay and expected behavior.

    * End of Optional Procedure to Automate the First Time Logon Setup *
      My Computers


  6. Posts : 8
    Windows 10 Pro 1803
    Thread Starter
       #6

    Thanks for all the info hsehestedt -- I have actually read and followed a lot of Kari's tutorials (the ones from here, from his blog, from while he was an MS MVP, etc.) as well as those from many other sources (

    Yes, the systems I am imaging are UEFI; I jump into Audit Mode, install / configure everything, I do use the copy profile option in my file, as well as a number of other configurations, and then I sysprep the machine, capture the WIM using WinPE / DISM, drop the INSTALL.WIM file onto USB Drive \ Sources directory, and then drop the AutoUnattend.xml on the flash drive as well.

    I had the option "Add List Item" set previously, but it didn't seem to work, which is why I switched over to "Modify" for the partitions just the other day, hoping that is what I was missing, but it does not appear that that is the case,

    Thanks again, hsehestedt. I hope some others have a chance to look over this post also, as I would love to get some more input on this...

    - - - Updated - - -

    PS,

    I should also mention that the PCs we order already have the Dell partitioning on them, so when we are booting off the USB drives to image the computer, there are current partitions which need to be nuked and paved, and I think that is where my AutoUnattend.xml file is getting hung up at.

    I am going to try to remove the partitions before I run my next AutoUnattend.xml -- maybe that will help?

    I really am at a loss here...
      My Computer


  7. Posts : 17,661
    Windows 10 Pro
       #7

    The answer file attached in post #1 is simply wrong. Action in all <CreatePartition> and <ModifyPartition> sections should be add, not modify, as @hsehestedt told you.

    The setting <WillWipeDisk>true</WillWipeDisk> will wipe the disk, so there are no existing partitions to modify, therefore partitioning fails.

    Kari
      My Computer


  8. Posts : 8
    Windows 10 Pro 1803
    Thread Starter
       #8

    Kari said:
    The answer file attached in post #1 is simply wrong. Action in all <CreatePartition> and <ModifyPartition> sections should be add, not modify, as @hsehestedt told you.

    The setting <WillWipeDisk>true</WillWipeDisk> will wipe the disk, so there are no existing partitions to modify, therefore partitioning fails.

    Kari
    Thanks Kari,

    I will modify that once more and see if it works.

    Vincint


    EDIT:

    I changed the modify to add in both the <CreatePartition> and <ModifyPartition> sections but it still flakes out and stops at the disk partitioning, so I manually wiped out the partitions and cold booted again off the same USB, but it still stops at disk partitioning; this time, however, it shows there are no partitions, since I manually wiped them out. Could something be going on with the <WillWipeDisk>true</WillWipeDisk>, where it is not wiping the disk, maybe?

    Once more, I am at a loss of why this Windows 10 Pro image is being such a pain...
      My Computer


  9. Posts : 17,661
    Windows 10 Pro
       #9

    Vincint said:
    Once more, I am at a loss of why this Windows 10 Pro image is being such a pain...
    It's not pain if done correctly (Sorry, couldn't resist.)

    I spotted one more syntax error in all four of your <ModifyPartition> sections:

    Code:
                            <ModifyPartition wcm:action="modify">
                                <Letter>C</Letter>
                                <Order>4</Order>
                                <PartitionID>4</PartitionID>
                                <Label>Windows</Label>
                                <Format>NTFS</Format>
                                <Active>true</Active>
                            </ModifyPartition>

    <Active>true</Active> or <Active>false</Active> setting is never used on GPT disk on UEFI systems, and even on MBR disk on BIOS systems, only one partition can be active. You have marked all four partitions active, when none should have that setting.

    Remove that line from each of four <ModifyPartition>.

    Kari
      My Computer


  10. Posts : 8
    Windows 10 Pro 1803
    Thread Starter
       #10

    Kari said:
    It's not pain if done correctly (Sorry, couldn't resist.)

    I spotted one more syntax error in all four of your <ModifyPartition> sections:

    Code:
                            <ModifyPartition wcm:action="modify">
                                <Letter>C</Letter>
                                <Order>4</Order>
                                <PartitionID>4</PartitionID>
                                <Label>Windows</Label>
                                <Format>NTFS</Format>
                                <Active>true</Active>
                            </ModifyPartition>

    <Active>true</Active> or <Active>false</Active> setting is never used on GPT disk on UEFI systems, and even on MBR disk on BIOS systems, only one partition can be active. You have marked all four partitions active, when none should have that setting.

    Remove that line from each of four <ModifyPartition>.

    Kari
    Bwahahaha! And, it's better than me bugging you on Twitter and your blog constantly lol

    Making the change to the answer file now and testing momentarily...


    EDIT:

    I changed the <ModifyPartition> section of all partitions to be just blank, so it now reads as follows:

    <DiskConfiguration>
    <WillShowUI>OnError</WillShowUI>
    <Disk wcm:action="modify">
    <CreatePartitions>
    <CreatePartition wcm:action="add">
    <Order>1</Order>
    <Size>499</Size>
    <Type>Primary</Type>
    </CreatePartition>
    <CreatePartition wcm:action="add">
    <Order>2</Order>
    <Type>EFI</Type>
    <Extend>false</Extend>
    <Size>128</Size>
    </CreatePartition>
    <CreatePartition wcm:action="add">
    <Order>4</Order>
    <Type>Primary</Type>
    </CreatePartition>
    <CreatePartition wcm:action="add">
    <Type>MSR</Type>
    <Size>16</Size>
    <Order>3</Order>
    </CreatePartition>
    </CreatePartitions>
    <ModifyPartitions>
    <ModifyPartition wcm:action="add">
    <Format>NTFS</Format>
    <Label>WinRE</Label>
    <PartitionID>1</PartitionID>
    <Order>1</Order>
    <TypeID>DE94BBA4-06D1-4D40-A16A-BFD50179D6AC</TypeID>
    </ModifyPartition>
    <ModifyPartition wcm:action="add">
    <Order>2</Order>
    <PartitionID>2</PartitionID>
    <Format>FAT32</Format>
    <Label>System</Label>
    <Extend>false</Extend>
    </ModifyPartition>
    <ModifyPartition wcm:action="add">
    <Letter>C</Letter>
    <Order>4</Order>
    <PartitionID>4</PartitionID>
    <Label>Windows</Label>
    <Format>NTFS</Format>
    </ModifyPartition>
    <ModifyPartition wcm:action="add">
    <Order>3</Order>
    <PartitionID>3</PartitionID>
    <Extend>false</Extend>
    </ModifyPartition>
    </ModifyPartitions>
    <DiskID>0</DiskID>
    <WillWipeDisk>true</WillWipeDisk>
    </Disk>
    </DiskConfiguration>



    I just tried the AutoUnattend.xml again, and it still stops at Disk Configuration and does not create or modify the partitions. Seriously, I know this is just something stupid, and something that I am just either not aware of or am overlooking, but this is driving me crazy! HELP! lol
    Last edited by Vincint; 30 May 2019 at 16:03.
      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 16:00.
Find Us




Windows 10 Forums