HELP NEEDED - Autounattend.xml

Discussion in 'Scripting' started by chrisgun, Jul 30, 2017.

  1. chrisgun

    chrisgun MDL Novice

    Feb 28, 2012
    30
    1
    0
    #1 chrisgun, Jul 30, 2017
    Last edited by a moderator: Jul 30, 2017
    Hi All

    Im setting up a server to handle Windows Iso and install them unattended.
    When booting to pxe it works and auto format and select the drive. and gets to the Installing Windows page but it show an error at the last bit after it restarts. (Completing Installation)

    The Error is -

    Windows Could not parse or process the unattend answer file for pass [specialize]. The settings specified in the answer file cannot be applied. The error was detected while processing setting for components [Microsoft-Windows-Shell-Setup].

    What i am trying to do is get it to install automatic with UK language. The username is User with admin and no password. so once we boot to pxe and select what operating system we can leave it and come back to it when it loads to desktop.

    This is for Windows 7
    Content of the Autounattend.xml file is below.
    Code:
    <!--*************************************************
    Windows 7 Answer File Generator
    Created using Windows AFG found at:
    http://windowsafg.no-ip.org
    
    Installation Notes
    Location:
    Notes: Enter your comments here...
    **************************************************-->
    
    <?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="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>2057:00000809</InputLocale>
    <SystemLocale>en-US</SystemLocale>
    <UILanguage>en-US</UILanguage>
    <UserLocale>en-US</UserLocale>
    </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>2057:00000809</InputLocale>
    <SystemLocale>en-US</SystemLocale>
    <UILanguage>en-US</UILanguage>
    <UserLocale>en-US</UserLocale>
    </component>
    <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">
    <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>
    <Type>Primary</Type>
    <Extend>true</Extend>
    </CreatePartition>
    </CreatePartitions>
    <ModifyPartitions>
    <ModifyPartition wcm:action="add">
    <Format>NTFS</Format>
    <Label>System Reserved</Label>
    <Order>1</Order>
    <Active>true</Active>
    <PartitionID>1</PartitionID>
    <TypeID>0x27</TypeID>
    </ModifyPartition>
    <ModifyPartition wcm:action="add">
    <Active>true</Active>
    <Format>NTFS</Format>
    <Label>WinOS</Label>
    <Letter>C</Letter>
    <Order>2</Order>
    <PartitionID>2</PartitionID>
    </ModifyPartition>
    </ModifyPartitions>
    </Disk>
    </DiskConfiguration>
    <ImageInstall>
    <OSImage>
    <InstallTo>
    <DiskID>0</DiskID>
    <PartitionID>2</PartitionID>
    </InstallTo>
    <WillShowUI>OnError</WillShowUI>
    <InstallToAvailablePartition>false</InstallToAvailablePartition>
    </OSImage>
    </ImageInstall>
    <UserData>
    <AcceptEula>true</AcceptEula>
    <FullName>User</FullName>
    <Organization></Organization>
    </UserData>
    <EnableFirewall>true</EnableFirewall>
    </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">
    <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>
    <Type>Primary</Type>
    <Extend>true</Extend>
    </CreatePartition>
    </CreatePartitions>
    <ModifyPartitions>
    <ModifyPartition wcm:action="add">
    <Format>NTFS</Format>
    <Label>System Reserved</Label>
    <Order>1</Order>
    <Active>true</Active>
    <PartitionID>1</PartitionID>
    <TypeID>0x27</TypeID>
    </ModifyPartition>
    <ModifyPartition wcm:action="add">
    <Active>true</Active>
    <Format>NTFS</Format>
    <Label>WinOS</Label>
    <Letter>C</Letter>
    <Order>2</Order>
    <PartitionID>2</PartitionID>
    </ModifyPartition>
    </ModifyPartitions>
    </Disk>
    </DiskConfiguration>
    <ImageInstall>
    <OSImage>
    <InstallTo>
    <DiskID>0</DiskID>
    <PartitionID>2</PartitionID>
    </InstallTo>
    <WillShowUI>OnError</WillShowUI>
    <InstallToAvailablePartition>false</InstallToAvailablePartition>
    </OSImage>
    </ImageInstall>
    <UserData>
    <AcceptEula>true</AcceptEula>
    <FullName>User</FullName>
    <Organization></Organization>
    </UserData>
    <EnableFirewall>true</EnableFirewall>
    </component>
    </settings>
    <settings pass="generalize">
    <component name="Microsoft-Windows-Security-SPP" 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">
    <SkipRearm>1</SkipRearm>
    </component>
    </settings>
    <settings pass="generalize">
    <component name="Microsoft-Windows-Security-SPP" 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">
    <SkipRearm>1</SkipRearm>
    </component>
    </settings>
    <settings pass="specialize">
    <component name="Microsoft-Windows-Security-SPP-UX" 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">
    <SkipAutoActivation>false</SkipAutoActivation>
    </component>
    <component name="Microsoft-Windows-Security-SPP-UX" 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">
    <SkipAutoActivation>false</SkipAutoActivation>
    </component>
    <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">
    <ComputerName>-PC</ComputerName>
    <ProductKey>----</ProductKey>
    <TimeZone>GMT Standard Time</TimeZone>
    </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">
    <ComputerName>-PC</ComputerName>
    <ProductKey>----</ProductKey>
    <TimeZone>GMT Standard Time</TimeZone>
    </component>
    </settings>
    <settings pass="oobeSystem">
    <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>2057:00000809</InputLocale>
    <UILanguage>en-GB</UILanguage>
    <UserLocale>en-GB</UserLocale>
    </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>2057:00000809</InputLocale>
    <UILanguage>en-GB</UILanguage>
    <UserLocale>en-GB</UserLocale>
    </component>
    <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">
    <RegisteredOwner>User</RegisteredOwner>
    <OOBE>
    <HideEULAPage>true</HideEULAPage>
    <NetworkLocation>Home</NetworkLocation>
    <ProtectYourPC>1</ProtectYourPC>
    <HideWirelessSetupInOOBE>false</HideWirelessSetupInOOBE>
    <SkipMachineOOBE>false</SkipMachineOOBE>
    <SkipUserOOBE>false</SkipUserOOBE>
    </OOBE>
    <DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet>
    <FirstLogonCommands>
    <SynchronousCommand wcm:action="add">
    <RequiresUserInput>false</RequiresUserInput>
    <Order>1</Order>
    <Description>Disable Auto Updates</Description>
    <CommandLine>reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 2 /f</CommandLine>
    </SynchronousCommand>
    <SynchronousCommand wcm:action="add">
    <Description>Control Panel View</Description>
    <Order>2</Order>
    <CommandLine>reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel" /v StartupPage /t REG_DWORD /d 1 /f</CommandLine>
    <RequiresUserInput>true</RequiresUserInput>
    </SynchronousCommand>
    <SynchronousCommand wcm:action="add">
    <Order>3</Order>
    <Description>Control Panel Icon Size</Description>
    <RequiresUserInput>false</RequiresUserInput>
    <CommandLine>reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel" /v AllItemsIconView /t REG_DWORD /d 0 /f</CommandLine>
    </SynchronousCommand>
    </FirstLogonCommands>
    <AutoLogon>
    <Password>
    <Value></Value>
    <PlainText>true</PlainText>
    </Password>
    <Enabled>true</Enabled>
    <Username>User</Username>
    </AutoLogon>
    <UserAccounts>
    <LocalAccounts>
    <LocalAccount wcm:action="add">
    <Password>
    <Value></Value>
    <PlainText>true</PlainText>
    </Password>
    <Description></Description>
    <DisplayName>User</DisplayName>
    <Group>Administrators</Group>
    <Name>User</Name>
    </LocalAccount>
    </LocalAccounts>
    </UserAccounts>
    </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">
    <RegisteredOwner>User</RegisteredOwner>
    <OOBE>
    <HideEULAPage>true</HideEULAPage>
    <NetworkLocation>Home</NetworkLocation>
    <ProtectYourPC>1</ProtectYourPC>
    <HideWirelessSetupInOOBE>false</HideWirelessSetupInOOBE>
    <SkipMachineOOBE>false</SkipMachineOOBE>
    <SkipUserOOBE>false</SkipUserOOBE>
    </OOBE>
    <DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet>
    <FirstLogonCommands>
    <SynchronousCommand wcm:action="add">
    <RequiresUserInput>false</RequiresUserInput>
    <Order>1</Order>
    <Description>Disable Auto Updates</Description>
    <CommandLine>reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 2 /f</CommandLine>
    </SynchronousCommand>
    <SynchronousCommand wcm:action="add">
    <Description>Control Panel View</Description>
    <Order>2</Order>
    <CommandLine>reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel" /v StartupPage /t REG_DWORD /d 1 /f</CommandLine>
    <RequiresUserInput>true</RequiresUserInput>
    </SynchronousCommand>
    <SynchronousCommand wcm:action="add">
    <Order>3</Order>
    <Description>Control Panel Icon Size</Description>
    <RequiresUserInput>false</RequiresUserInput>
    <CommandLine>reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel" /v AllItemsIconView /t REG_DWORD /d 0 /f</CommandLine>
    </SynchronousCommand>
    </FirstLogonCommands>
    <AutoLogon>
    <Password>
    <Value></Value>
    <PlainText>true</PlainText>
    </Password>
    <Enabled>true</Enabled>
    <Username>User</Username>
    </AutoLogon>
    <UserAccounts>
    <LocalAccounts>
    <LocalAccount wcm:action="add">
    <Password>
    <Value></Value>
    <PlainText>true</PlainText>
    </Password>
    <Description></Description>
    <DisplayName>User</DisplayName>
    <Group>Administrators</Group>
    <Name>User</Name>
    </LocalAccount>
    </LocalAccounts>
    </UserAccounts>
    </component>
    </settings>
    <settings pass="offlineServicing">
    <component name="Microsoft-Windows-LUA-Settings" 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">
    <EnableLUA>false</EnableLUA>
    </component>
    </settings>
    <settings pass="offlineServicing">
    <component name="Microsoft-Windows-LUA-Settings" 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">
    <EnableLUA>false</EnableLUA>
    </component>
    </settings>
    </unattend>
    
     
  2. LostED

    LostED MDL MIRROR Hardlink

    Jul 30, 2009
    4,233
    10,033
    150
  3. mehdibleu

    mehdibleu MDL Expert

    Jun 14, 2017
    1,012
    209
    60
    #3 mehdibleu, Aug 7, 2017
    Last edited: Aug 8, 2017
    sorry for the delay but i've just looked at tour topic:

    try to remove these lines from your script :
    Code:
    <ProductKey>----</ProductKey>
    
    and change these lines :

    Code:
    <SkipAutoActivation>false</SkipAutoActivation>
    
    to :

    Code:
    <SkipAutoActivation>true</SkipAutoActivation>
    
    BY doing that the script will make sure that entering window key and autoactivation are skipped during the installation.
     
  4. Flipp3r

    Flipp3r MDL Expert

    Feb 11, 2009
    1,511
    644
    60
    Code:
    <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">
        <ComputerName>-PC</ComputerName>
        <ProductKey>----</ProductKey>
        <TimeZone>GMT Standard Time</TimeZone>
    </component>
    Perhaps "-" makes for error. Remove from computer name & either have the correct product key or leave blank.

    Those generated scripts always look crap with no indentation...
     
  5. chrisgun

    chrisgun MDL Novice

    Feb 28, 2012
    30
    1
    0
    Sorry for the late reply.

    Thank you for your help I got this working.

    I found that as i was using a All in one ISO it was part using a 32bit version then once restarted it used the 64bit version so the answer file was getting confused.