8

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.

Tometzky
  • 2,649
  • 4
  • 26
  • 32

3 Answers3

2
<?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.
Tometzky
  • 2,649
  • 4
  • 26
  • 32
  • In case you are wondering where to place the file like me, you can place it directly on c:. If you call the command line like shown above, this will cache the file in the Panter folder. All the information here: https://technet.microsoft.com/en-us/library/cc749415(WS.10).aspx – codea Nov 06 '16 at 09:31
  • 1
    Will this work for Windows 2016? I'm trying to find the same thing for Win 2016 and found this. Thanks. – Just a learner Apr 28 '18 at 18:29
0

There's a similar question in Super user: Sysprep WITHOUT creating new user

For reference, here's the minimal unattend.xml file that was posted there:

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
  <settings pass="oobeSystem">
    <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">
      <OOBE>
        <SkipMachineOOBE>true</SkipMachineOOBE>
        <SkipUserOOBE>true</SkipUserOOBE>
      </OOBE>
    </component>
  </settings>
</unattend>

You can copy and paste this to Notepad, and save it as "unattend.xml" (with the quotation marks - so the file extension will be xml). Credits goes to blaniel.

Oz Edri
  • 111
  • 4
0

You can have it join a domain without a password using UnsecureJoin.

Pierre.Vriens
  • 1,159
  • 34
  • 15
  • 19
MSCF
  • 135
  • 1
  • 3
  • 11
  • In fact, unsecure join is MORE SECURE than specifying a username/password, as both are stored in plain text if I am correct. – YetiFiasco Sep 17 '14 at 08:10
  • If I undestand correctly from [UnsecureJoin documentation](http://technet.microsoft.com/en-us/library/cc765972%28v=WS.10%29.aspx) you need to have computer account created on server before using it. So this conflicts with "it should create random computer name" requirement. – Tometzky Oct 15 '14 at 19:31