Windows 7 Autounattend Example

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

If you’re unfamiliar with how to use an autounattend file:

The autounattend.xml file can be used to automate a single installation of Windows 7 when using DVD media.

When you run your Windows 7 installation it will automatically look for any USB drives containing an autounattend.xml file and apply the settings specified.

To use:

  1. Copy the quoted text into notepad
  2. Edit as required
    1. edit or remove the product key
    2. edit the organisation section
    3. edit the local administrator password as required
    4. edit the ‘UserName’ local administrator account name and password
  3. Save the file as autounattend.xml 
  4. Copy the file to the ROOT (start) of a USB Drive
  5. When you run your Windows 7 installation it will automatically look for any USB drives containing an autounattend.xml file then apply the settings specified.

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>

10 comments on “Windows 7 Autounattend Example

  1. I have applied this answer file to my USB flash memory and it worked fine.

    But I am not able to apply it on my portable USB hard disk. I am able to boot from it, but it didn’t detect the autounattend/unattend file.

  2. JAZEEl – Try adding the following to the OOBE section.

    SkipMachineOOBE – false
    SkipUserOOBE – true

    I’ve updated the example above to reflect these changes, as you’re right – it’s a good addition. 🙂

    [b]Please Note:[/b] You need to ensure that you have an account to log on with – either the enabled Administrator account or a create account like ‘UserName’ in the example above.

  3. hi..
    Thanks for your reply..

    I applied this and it’s working fine and it detects the autounattend.xml. Bu the problem is, at the lat step, it’s asking for the computer name and user name. I want to disable the prompt for user creating. I need only to prompt for the computer name.

    Please help

    Thanks

  4. Hi JAZEEl – Try saving the file as autounattend.xml onto the root (start) of the USB drive.
    After you select the language the installation will search all attached USB drives for the ‘autounattend.xml’ answer file and apply it.
    More information can be found here: http://technet.microsoft.com/en-us/library/dd349348%28WS.10%29.aspx

    As a word of caution, I had some troubles getting the [b]” [/b]section of this answer file to work correctly. You may need to revise it.

Leave a Comment

Your email address will not be published. Required fields are marked *