This is not an easy task. I can only give you a high level overview.
Look for the Microsoft tool SYSPREP - with it you can reset a machine you have previously installed with all the software and drivers you require to a state where it boots running a "mini-setup" including driver discovery. Example:
Sysprep /oobe /generalize /shutdown
The programs remain installed. Shutdown the PC after sysprep ran and take an image using Ghost or any other imaging tool of your choice.
Note:
All essential hardware drivers such as chipset, harddisk, cpu etc. for the target hardware need to be registered using PNPUTIL before you are using SYSPREP, otherwise the prepared and applied image boots into a bluescreen on the target PC. Registering more drivers than you need does not harm as Windows detects the hardware and only installs the drivers it needs. Simply put all driver packages in
C:\drivers
, then run the following command in a command window to register them for plug and play (note that using-a -i
installs them, but here you need just-a
, which advertises them). It will run recursively through all directories where*.inf
files are contained:for /f "tokens=*" %i in ('dir /b /s "C:\drivers\*.inf"') do pnputil -a %i
Hint: If you put this command in a batch file, you need to use
%%i
instead of%i
.- You have to activate windows after the "mini-setup" ran if the firmware does not contain a windows key installed by the vendor. Regarding Windows activation, I found at least some information, however not in too much detail here.
This is how hardware vendors are preparing their PCs.
You can find a lot of information about it at Microsofts TechNet sites, check this out: Deliver and deploy Windows 8
I hope this helps.