Sysprep in Windows 7

Sysprep has changed significantly from Windows XP to Windows Vista/7. After Windows XP Microsoft came out with a new advanced Windows Imaging system and unattended installer using the Automated Installation Kit tool. Sysprep had to evolve to integrate with these new tools. The new sysprep is very powerful but a bit more complicated.

=High Level Sysprep Instructions=
 * 1) Install Windows 7 as usual
 * 2) When the system reboots for the last time and you are presented with the "Set up Windows" interface, press "Shift+Ctrl+F3" to enter into the audit mode.
 * 3) *The computer will continue to reboot into audit mode until resealed by Sysprep.
 * 4) *The OS will be locked in audit mode when the OS goes into Sleep, Hibernate, or Locked mode. The OS can be unlocked by rebooting it.
 * 5) *The Administrator account is not activated while in audit mode so it is important not to Log Off the system otherwise you will not be able to log back in.
 * 6) Customize your installation. More detailed instructions for image customization can be found for Windows 7 and Windows XP
 * 7) Copy the file inveneo-answer-file.xml into C:\Windows\System32\sysprep
 * 8) Open a command prompt and run the following command:
 * C:\Windows\System32\sysprep\sysprep.exe /generalize /oobe /shutdown /unattend:C:\Windows\System32\sysprep\inveneo-answer-file.xml
 * 1) Allow the sysprep process to finish (it may take several minutes) and the system will shut down.
 * 2) Create the Image
 * 3) Boot the system and validate the image.

=Creating the Answer File= The Answer file should be created on a separate Windows 7 machine than the reference system (on which you are creating the image). An excellent reference is here as well as detailed documentation in the Microsoft TechCenter
 * 1) On a Windows 7 system, insert the Automated Installation Kit installer disk, download is available here.
 * 2) Prior to running the AIK installer, run both the ".NET Framework Setup" and "MSXML 6 SP1 Setup", available on the homepage of the AIK installer homepage.
 * 3) Run the "Windows AIK Setup" to install the AIK.
 * 4) Open Windows System Image Manager from Start Menu.
 * 5) Click “File” -> “Select Windows Image…” -> Choose the appropriate .clg file for your version of Windows 7 from “Win7 Installation DVD\sources\”
 * 6) *The Windows 7 Professional .clg file is [[Image:Install Windows 7 PROFESSIONAL.clg.zip|here]].
 * 7) Click “File” -> “New Answer File…” to create a new answer file.
 * 8) Deploy “Components” in "Windows Image” and add the following options by Right Clicking the specified key and adding them to the following Passes:

Pass 3 Generalize x86_Microsoft-Windows-PnpSysprep_6.1.7600.16385_neutral Set the "PersistAllDeviceInstalls" as "True" x86_Microsoft-Windows-Security-SPP_6.1.7600.16385_neutral Set 1 for SkipRearm to allow up to 8 rearms

Pass 7 oobeSystem x86_Microsoft-Windows-Shell-Setup_6.1.7600.16385_neutral RegisteredOrganization: Inveneo RegisteredOwner: Inveneo UserAccounts LocalAccounts Password: 1nvene0 Action: AddListItem Description: Inveneo Administrator Account DisplayName: Administrator Group: Administrators Name:Inveneo AdministratorPassword: Value=1nvene0

Save the answer file as inveneo-answer-file.xml

Note: The answer file is also editable via xml rather than GUI interface

=Sysprep Notes=
 * Sysprep strips all of the 3rd party drivers during the "Generalize" pass unless otherwise specified.
 * You can introduce unnecessary settings by inserting a setting's parent node into the answer file. In general, it is best to expand down to the lowest level of a component and select only those elements that you intend to set. For the default value, there is no need to include the element unless it is a required element.