Unattended installation for windows 7 x86

5

2

Are there any pre-created Autounattend.xml files for Windows 7 unattended installation x86? I have been experimenting and creating the XML file but I am always being prompted to choose which hard disk to format. I can't seem to add in the script to automate that process.

I tried adding the DiskConfiguration portion but the installation keeps giving me error that my diskID is incorrect.

How do I resolve this issue? Is there any pre-created Autounattend.xml file that automates everything?

I want it to work for VMware virtual machine. Currently, VMware creates its own default disk. So RT Seven Lite only works for normal computer and not VMware.

user448402

Posted 2011-06-29T03:33:04.433

Reputation: 75

When you say VMWare creates it's own default disk, do you mean it formats the disk with a filesystem? (I apologize, I am only familiar with VirtualBox) – Breakthrough – 2011-06-29T10:24:35.403

@Breakthrough No it does not format the disk with a filesystem, I have to use the Autounattend.xml to specify the format type. What I meant was VMware creates its own default disk without any partition which is 'Disk0 Unallocated Space'. Btw Here the link to my Autounattend.xml script: http://pastebin.com/dGjap3Wf.

– user448402 – 2011-06-30T03:35:57.607

Answers

5

The following autounattended.xml file can be used to full automate the Windows 7 installation.

It will:

  • Create a single partition for the boot, system, crash dump and primary partition
  • Enter the product key
  • Enter the organisation information
  • Configure Internet Explorer 8
  • Disable the information bar
  • Disable the Internet accelerators
  • Disable the developer tools
  • Disable the first run message
  • Set www.google.com.au as the homepage
  • Set Google Australia as the default search provider
  • Set the firewall to option 3 – Work
  • Enable the ‘Administrator’ account
  • Set the ‘Administrator’ password to ‘password’
  • Create a local administrator account called ‘UserName’ with the password of ‘password’
  • Prompt for a computer name (will not prompt for a new user account)

Before being able to successfully use this unattended file, you will need to change:

  • Product Key
  • Organisation information
  • local administrator password
  • ‘UserName’ local administrator account name and password

Autounattend.xml:

 <?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">
            <ImageInstall>
                <OSImage>
                    <WillShowUI>Never</WillShowUI>
                    <InstallTo>
                        <DiskID>0</DiskID>
                        <PartitionID>1</PartitionID>
                    </InstallTo>
                </OSImage>
            </ImageInstall>
            <UserData>
                <ProductKey>
                    <WillShowUI>Never</WillShowUI>
                    <Key>XXXX-XXXX-XXXX-XXXX-XXXX</Key>
                </ProductKey>
                <FullName>Information Technology Services</FullName>
                <Organization>Organisation Name</Organization>
                <AcceptEula>true</AcceptEula>
            </UserData>
            <DiskConfiguration>
                <WillShowUI>Never</WillShowUI>
                <Disk>
                    <DiskID>0</DiskID>
                    <WillWipeDisk>true</WillWipeDisk>
                    <CreatePartitions>
                        <CreatePartition>
                            <Order>1</Order>
                            <Type>Primary</Type>
                            <Extend>true</Extend>
                        </CreatePartition>
                    </CreatePartitions>
                </Disk>
            </DiskConfiguration>
        </component>
    </settings>
    <settings pass="specialize">
        <component name="Microsoft-Windows-Deployment" 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">
            <RunSynchronous>
                <RunSynchronousCommand wcm:action="add">
                    <Path>net user administrator /active:yes</Path>
                    <Order>1</Order>
                </RunSynchronousCommand>
            </RunSynchronous>
        </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">
            <ShowWindowsLive>false</ShowWindowsLive>
        </component>
        <component name="Microsoft-Windows-IE-InternetExplorer" 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">
            <FilterLevel>High</FilterLevel>
            <ShowInformationBar>false</ShowInformationBar>
            <DisableAccelerators>true</DisableAccelerators>
            <DisableDevTools>true</DisableDevTools>
            <DisableFirstRunWizard>true</DisableFirstRunWizard>
            <DisableOOBAccelerators>true</DisableOOBAccelerators>
            <Home_Page>http://www.google.com.au</Home_Page>
            <SearchScopes>
                <Scope wcm:action="add">
                    <ScopeDefault>true</ScopeDefault>
                    <ScopeDisplayName>Google</ScopeDisplayName>
                    <ScopeKey>SearchProvider1</ScopeKey>
                    <ScopeUrl>http://www.google.com.au/search?q={searchTerms}</ScopeUrl>
                </Scope>
            </SearchScopes>
        </component>
        <component name="Microsoft-Windows-ErrorReportingCore" 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">
            <DisableWER>1</DisableWER>
        </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">
            <OOBE>
                <ProtectYourPC>3</ProtectYourPC>
                <NetworkLocation>Work</NetworkLocation>
                <SkipMachineOOBE>true</SkipMachineOOBE>
                <SkipUserOOBE>false</SkipUserOOBE>
            </OOBE>
            <UserAccounts>
                <LocalAccounts>
                    <LocalAccount wcm:action="add">
                        <Password>
                            <Value>password</Value>
                            <PlainText>true</PlainText>
                        </Password>
                        <Name>UserName</Name>
                        <Group>Administrators</Group>
                    </LocalAccount>
                </LocalAccounts>
                <AdministratorPassword>
                    <Value>password</Value>
                    <PlainText>true</PlainText>
                </AdministratorPassword>
            </UserAccounts>
            <TimeZone>Eastern Standard Time</TimeZone>
        </component>
    </settings>
</unattend>

Source: Windows 7 Autounattend Example

ovann86

Posted 2011-06-29T03:33:04.433

Reputation: 1 106

1Add the necessary information here, on the site, not just in a link, please. – slhck – 2014-07-24T11:54:14.553

But it does not work for VMware. How shall i customize it? – user448402 – 2011-06-30T08:14:56.727

At what stage is it failing? It should indicate which section. – ovann86 – 2011-06-30T10:09:33.333

@ovan86 it keeps asking me to selecting which hard disk I wish to install the operating system in my Virtual Machine. I wish to automate that process. – user448402 – 2011-07-01T02:26:55.430

what should i do? – user448402 – 2011-07-04T01:08:19.910

I've only seen this before where the autounattend file wasn't being detected at all. If you manually specify the parition information does the rest of the unattend information get applied? – ovann86 – 2011-07-04T08:02:43.143

i managed to solve it. The disk configuration XML tag should be placed at a specify location where it reads the disk setup in the autounattend.xml. – user448402 – 2011-07-04T08:28:12.020

1

You can also use a utility like RT7Lite to create an unattended installation of Windows, similar to the older nLite for Windows XP. You can also remove unnecessary components and features from the operating system, and removing them from the installation itself.

Depending on what you want/need to remove, you can drastically reduce the size of the installed operating system. However, if you just need the Autounattend.xml file, you can run through the entire build process and extract the final file from the resulting disc image.

Breakthrough

Posted 2011-06-29T03:33:04.433

Reputation: 32 927

But it does not work for VMware. How shall i customize it? – user448402 – 2011-06-29T08:28:19.960

am getting this error: Windows could not set a partition active on disk0. The specified partition does not exist on the target disk. The error occurred while applying the unattended answer file’s <DiskCongifuration> settings. – user448402 – 2011-06-29T08:29:09.510

I have a working Autounattend.xml file that automates everything but only prompt at the selecting the disk 0 unallocated space part. – user448402 – 2011-06-29T08:35:47.433

Could you possibly upload your Autounattend.xml file for us to see (maybe to http://pastebin.com/), or update your question with the information between the the DiskConfiguration and ImageInstall starting and ending tags? (just a reminder, if you upload the whole thing, remove your serial number first!!)

– Breakthrough – 2011-06-29T10:27:02.530

Here the link to my Autounattend.xml script: http://pastebin.com/dGjap3Wf

– user448402 – 2011-06-30T01:04:55.873

@user448402 you need to include <ImageInstall> and <DiskConfiguration> tags as per ovann86's answer. IIRC, RT7Lite creates these tags for you when you go through the unattended procedure if you configure disk formatting properly... – cp2141 – 2011-06-30T13:49:12.167

I added those tags but it works for normal windows installation and not on Virtual machine. It did not detect the DiskConfiguration tag. – user448402 – 2011-07-01T02:26:12.433