Autounattend.xml - problem with partitions

Options
Stefan
Stefan New Member Posts: 3
I'm trying to get an Autounattend.xml file working to install Windows 10 Insider from USB.
But the installation stops with

The installation was canceled
Windows could not set a partition active on disk 0. The target disk, partition, or volume does not support the specified operation. The error occurred whilte applying the unattend answer fils' <DiskConfiguration> setting. Error code: 0x80300024

Here is the Autounattend.xml I put onto the USB stick after copying all Windows 10 files from ISO to USB.

Would be great if we find out what blocks the unattend installation. I tried several different settings, types, and partitions with similar errors.
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
  <servicing/>
  <settings pass="windowsPE">
    <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
      <DiskConfiguration>
        <!-- http://www.msfn.org/board/topic/154404-how-to-clean-gpt-hard-disk-using-autounattendxml/ -->
        <WillShowUI>Always</WillShowUI>
        <Disk>
          <DiskID>0</DiskID>
          <WillWipeDisk>true</WillWipeDisk>
          <CreatePartitions>
            <CreatePartition>
              <!-- Create the Recovery partition -->
              <Order>1</Order>
              <Type>Primary</Type>
              <Size>450</Size>
            </CreatePartition>
            <CreatePartition>
              <!-- Create the EFI partition -->
              <Order>2</Order>
              <Type>EFI</Type>
              <Size>100</Size>
            </CreatePartition>
            <CreatePartition>
              <!-- Create the MSR partition -->
              <Order>3</Order>
              <Type>MSR</Type>
              <Size>128</Size>
            </CreatePartition>
            <CreatePartition>
              <!-- Create the Windows partition and fill the rest of the hard disk -->
              <Order>4</Order>
              <Type>Primary</Type>
              <Extend>true</Extend>
            </CreatePartition>
          </CreatePartitions>
          <ModifyPartitions>
            <ModifyPartition>
              <!-- Modify the recovery partition -->
              <Order>1</Order>
              <PartitionID>1</PartitionID>
              <Format>NTFS</Format>
              <Label>Recovery</Label>
              <TypeID>de94bba4-06d1-4d40-a16a-bfd50179d6ac</TypeID>
            </ModifyPartition>
            <ModifyPartition>
              <!-- Modify the system partition -->
              <Order>2</Order>
              <PartitionID>2</PartitionID>
              <Active>true</Active>
              <Format>FAT32</Format>
              <Label>System</Label>
            </ModifyPartition>
            <!-- The MSR partition does not need to be modified -->
            <ModifyPartition>
              <!-- Modify the Windows partition -->
              <Order>3</Order>
              <PartitionID>4</PartitionID>
              <Format>NTFS</Format>
              <Label>Windows</Label>
            </ModifyPartition>
          </ModifyPartitions>
         </Disk>
      </DiskConfiguration>
      <UserData>
        <AcceptEula>true</AcceptEula>
        <FullName>User</FullName>
        <Organization>User</Organization>
        <!--  product key -->
        <!-- <ProductKey><Key>xxx</Key>
          <WillShowUI>Never</WillShowUI>
        </ProductKey> -->
      </UserData>
      <ImageInstall>
        <OSImage>
          <InstallTo>
            <DiskID>0</DiskID>
            <PartitionID>4</PartitionID>
          </InstallTo>
          <WillShowUI>Always</WillShowUI>
          <InstallToAvailablePartition>false</InstallToAvailablePartition>
          <InstallFrom>
            <MetaData wcm:action="add">
            <Key>/IMAGE/NAME</Key>
            <Value>Windows 10 Enterprise VL Insider Preview</Value>
          </MetaData>
          </InstallFrom>
        </OSImage>
      </ImageInstall>
    </component>
    <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
      <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="offlineServicing">
    <component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
      <EnableLUA>false</EnableLUA>
    </component>
  </settings>
  <settings pass="oobeSystem">
    <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
      <UserAccounts>
        <AdministratorPassword>
          <Value>Passw0rd!</Value>
          <PlainText>true</PlainText>
        </AdministratorPassword>
        <LocalAccounts>
          <LocalAccount wcm:action="add">
            <Password>
              <Value>Passw0rd!</Value>
              <PlainText>true</PlainText>
            </Password>
            <Description>Cloud User</Description>
            <DisplayName>demouser</DisplayName>
            <Group>administrators</Group>
            <Name>demouser</Name>
          </LocalAccount>
        </LocalAccounts>
      </UserAccounts>
      <OOBE>
        <HideEULAPage>true</HideEULAPage>
        <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
        <NetworkLocation>Home</NetworkLocation>
        <ProtectYourPC>1</ProtectYourPC>
      </OOBE>
      <AutoLogon>
        <Password>
          <Value>Passw0rd!</Value>
          <PlainText>true</PlainText>
        </Password>
        <Username>demouser</Username>
        <Enabled>true</Enabled>
      </AutoLogon>
      <FirstLogonCommands>
        <SynchronousCommand wcm:action="add">
          <CommandLine>cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine>
          <Description>Set Execution Policy 64 Bit</Description>
          <Order>1</Order>
          <RequiresUserInput>true</RequiresUserInput>
        </SynchronousCommand>
        <SynchronousCommand wcm:action="add">
          <CommandLine>C:\Windows\SysWOW64\cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine>
          <Description>Set Execution Policy 32 Bit</Description>
          <Order>2</Order>
          <RequiresUserInput>true</RequiresUserInput>
        </SynchronousCommand>
        <SynchronousCommand wcm:action="add">
          <CommandLine>cmd.exe /c reg add "HKLM\System\CurrentControlSet\Control\Network\NewNetworkWindowOff"</CommandLine>
          <Description>Network prompt</Description>
          <Order>3</Order>
          <RequiresUserInput>true</RequiresUserInput>
        </SynchronousCommand>
        <SynchronousCommand wcm:action="add">
          <CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v HideFileExt /t REG_DWORD /d 0 /f</CommandLine>
          <Order>6</Order>
          <Description>Show file extensions in Explorer</Description>
        </SynchronousCommand>
        <SynchronousCommand wcm:action="add">
          <CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\Console /v QuickEdit /t REG_DWORD /d 1 /f</CommandLine>
          <Order>7</Order>
          <Description>Enable QuickEdit mode</Description>
        </SynchronousCommand>
        <SynchronousCommand wcm:action="add">
          <CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v Start_ShowRun /t REG_DWORD /d 1 /f</CommandLine>
          <Order>8</Order>
          <Description>Show Run command in Start Menu</Description>
        </SynchronousCommand>
        <SynchronousCommand wcm:action="add">
          <CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v StartMenuAdminTools /t REG_DWORD /d 1 /f</CommandLine>
          <Order>9</Order>
          <Description>Show Administrative Tools in Start Menu</Description>
        </SynchronousCommand>
        <SynchronousCommand wcm:action="add">
          <CommandLine>%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateFileSizePercent /t REG_DWORD /d 0 /f</CommandLine>
          <Order>10</Order>
          <Description>Zero Hibernation File</Description>
        </SynchronousCommand>
        <SynchronousCommand wcm:action="add">
          <CommandLine>%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateEnabled /t REG_DWORD /d 0 /f</CommandLine>
          <Order>11</Order>
          <Description>Disable Hibernation Mode</Description>
        </SynchronousCommand>
        <SynchronousCommand wcm:action="add">
          <CommandLine>cmd.exe /c wmic useraccount where "name='demouser'" set PasswordExpires=FALSE</CommandLine>
          <Order>12</Order>
          <Description>Disable password expiration for user demouser</Description>
        </SynchronousCommand>
      </FirstLogonCommands>
      <ShowWindowsLive>false</ShowWindowsLive>
    </component>
  </settings>
  <settings pass="specialize">
    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
      <OEMInformation>
        <HelpCustomized>false</HelpCustomized>
      </OEMInformation>
      <!-- Rename computer here. -->
      <ComputerName>blue</ComputerName>
      <TimeZone>GMT Standard Time</TimeZone>
      <RegisteredOwner/>
    </component>
    <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
      <SkipAutoActivation>true</SkipAutoActivation>
    </component>
  </settings>
  <cpi:offlineImage xmlns:cpi="urn:schemas-microsoft-com:cpi" cpi:source="catalog:d:/sources/install_windows 7 ENTERPRISE.clg"/>
</unattend>

Comments

  • Wilco
    Wilco New Member Posts: 5
    Options
    Hi Scherer

    We had the same problems with a unattended file for Windows Server 2016.

    This was are solution for the problem.

    Don't know if it works for Windows 10 but you can give it a try.
    <?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">
    			<DiskConfiguration>
    			  <Disk wcm:action="add">
    				<DiskID>0</DiskID> 
    				<WillWipeDisk>true</WillWipeDisk> 
    				<CreatePartitions>
    				  <CreatePartition wcm:action="add">
    					<Order>1</Order> 
    					<Type>EFI</Type> 
    					<Size>400</Size> 
    				  </CreatePartition>
    				  <CreatePartition wcm:action="add">
    					<Order>2</Order> 
    					<Extend>true</Extend> 
    					<Type>Primary</Type> 
    				  </CreatePartition>
    				</CreatePartitions>
    			  </Disk>
    			  <WillShowUI>OnError</WillShowUI> 
    			</DiskConfiguration>
    			<ImageInstall>
    				<OSImage>
    				  <InstallTo>
    					<DiskID>0</DiskID>
    					<PartitionID>2</PartitionID>
    				  </InstallTo>
    				</OSImage>
    			</ImageInstall>
            </component>
        </settings>
        <cpi:offlineImage cpi:source="wim:c:/" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>
    
  • Stefan
    Stefan New Member Posts: 3
    Options
    Thank you FreekingNL.
    I'll give it a try. And at least it gives me the evidence that it should work in some way.
    Windows 2016 would be better for me, too.
    I have tried splitting the install.wim into 4GB parts and then run the installation, but after a reboot it doesn't find its boot device. I have seen another forum tip to extract the drivers and put it into the install.wim. But as I am installating from the big ISO with both desktop and core, these files are already inside the wim file, I think.
Privacy Policy