Tested on Windows 7, 8.1 and 10
Creating an Answer File for Windows Unattended Setup
Computer Imaging is an important part of Life Cycle Management. Creating and deploying Windows images requires running the System Preparation (Sysprep) tool. Sysprep removes system-specific data from Windows ensuring a successful restoration of the image, and creates a "generalized" Windows installation that will then be ready for configuration at next bootup. This article is a step-by-step guide on creating an answer file for Sysprep to completely automate the Windows 7 setup.
At this point you can either
It is highly recommended generated answer files are used with matching Windows releases, e.g 1909 answer file with Windows 10 1909, etc. If preparing a newer Windows 10 release, e.g. 2004, generate a new matching 2004 answer file.
Using the Answer File Properties and Settings panes, configure the following settings:
Please make sure that before you Sysprep your Image, that you check the disk. A reboot will be required.
chkdsk /R shutdown -r -t 0
Use a administrator command prompt to run the commands and reboot
Once chkdsk has completed and the machine is back in Windows, run a command prompt as administrator and type the following command to Sysprep your machine:
C:\Windows\System32\Sysprep\sysprep.exe /generalize /oobe /shutdown /unattend:PATH TO SYSPREP ANSWER FILE XML
Sysyprep will prepare the machine to be copied and shutdown.
To continue this workflow and capture this as a Master Image see... Windows Network Imaging - PXE