What is a minimal useful unattend.xml file for SysPrep on Windows 7

Could you provide a minimal unattend.xml file for use in Windows 7, which will be manually installed, updated and configured on one workstation, then SysPrep will be run like this:

C:\Windows\System32\sysprep>
sysprep /generalize /oobe /unattend:unattend.xml /shutdown

and then C: partition cloned to multiple workstations (I use partimage from a Linux LiveUSB for this).

This unattend.xml should configure a workstation so it will not ask for anything after cloning. Workstation should just show an ordinary login screen with accounts configured before. It should create random computer name and don't try to join Active Directory, as I'm not comfortable with storing passwords in unattend.xml.

I don't want to use Windows System Image Manager (Windows SIM) from Windows Automated Installation Kit (Windows AIK) as this is overkill — too complicated for my tastes.


<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend"
        xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <settings pass="generalize">
        <component name="Microsoft-Windows-PnpSysprep"
                processorArchitecture="amd64"
                publicKeyToken="31bf3856ad364e35"
                language="neutral" versionScope="nonSxS">
            <PersistAllDeviceInstalls>true</PersistAllDeviceInstalls>
        </component>
    </settings>
    <settings pass="specialize">
        <component name="Microsoft-Windows-Deployment"
                processorArchitecture="amd64"
                publicKeyToken="31bf3856ad364e35"
                language="neutral" versionScope="nonSxS">
            <RunSynchronous>
                <RunSynchronousCommand wcm:action="add">
                    <Description>Disable create user account</Description>
                    <Path>reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\OOBE /v UnattendCreatedUser /t REG_DWORD /d 1 /f</Path>
                    <Order>1</Order>
                </RunSynchronousCommand>
            </RunSynchronous>
        </component>
        <component name="Microsoft-Windows-Shell-Setup"
                processorArchitecture="amd64"
                publicKeyToken="31bf3856ad364e35"
                language="neutral" versionScope="nonSxS">
            <RegisteredOwner>Wile E. Coyote</RegisteredOwner>
            <RegisteredOrganization>ACME Corp.</RegisteredOrganization>
            <TimeZone>Central European Standard Time</TimeZone>
            <Computername>*</Computername>
            <OOBE>
                <HideEULAPage>true</HideEULAPage>
                <NetworkLocation>Other</NetworkLocation>
                <ProtectYourPC>2</ProtectYourPC>
                <SkipUserOOBE>true</SkipUserOOBE>
            </OOBE>
        </component>
    </settings>
    <settings pass="oobeSystem">
        <component name="Microsoft-Windows-International-Core"
                processorArchitecture="amd64"
                publicKeyToken="31bf3856ad364e35"
                language="neutral" versionScope="nonSxS">
            <InputLocale>pl-PL</InputLocale>
            <SystemLocale>pl-PL</SystemLocale>
            <UILanguage>pl-PL</UILanguage>
            <UserLocale>pl-PL</UserLocale>
        </component>
    </settings>
</unattend>

You just need to change:

  • <RegisteredOwner>
  • <RegisteredOrganization>
  • <TimeZone>
  • Polish locale pl-PL to yours, for example en-US for US.