When deploying Windows 7 via SCCM 2007, everything works fine when using the “Apply Operating System Image” task with the following configuration:
Using the same setup within an SCCM 2012 R2 environment, results in a failing task sequence at the task “Setup ConfigMgr Client” with the message “Exiting with code 0x80004005, Windows setup failed, code 31”.
The “setuperr.log” file created on the system drive (to be accessed via F8 console while still being in Windows PE) contains a message “AddDdriverPackageIntoDriverStore:Failed to install the driver package”, claiming a special inf file causing this issue. Disabling the affected driver in SCCM and starting the deployment again skips the problematic driver, but claims the same issue with the very next driver detected to be installed. At the end the task sequence is not able to complete successfully, until all matching drivers be disabled respectively the “AutoApplyDrivers” task has been disabled completely.
This blog, this Technet discussion and the Technet article which mentions: “ The build and capture task sequence was updated to apply an operating system image instead of running Setup.exe for installation. You can still run Setup.exe for Windows 8 deployments by editing the task sequence in the task sequence editor.” pointed me to the right direction to workaround this issue. Obviously the deployment method using the unattended setup does not work with Windows 7 anymore, but works only with Windows 8.
So changing the “Apply Operating System Image” task to the following setting allows the task sequence to complete successfully in installing Windows 7 with all matching drivers from the SCCM database: